From 4f6474440db754f7869ca68396a5177f84ea7be1 Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Wed, 10 Jun 2015 13:12:18 -0700 Subject: [PATCH] Add some docstrings --- autoapi/__init__.py | 3 +++ autoapi/domains/base.py | 27 +++++++++++++++++++++++++++ autoapi/settings.py | 6 ++++++ 3 files changed, 36 insertions(+) diff --git a/autoapi/__init__.py b/autoapi/__init__.py index e69de29..eff42a1 100644 --- a/autoapi/__init__.py +++ b/autoapi/__init__.py @@ -0,0 +1,3 @@ +""" +AutoAPI Top-level Comment +""" \ No newline at end of file diff --git a/autoapi/domains/base.py b/autoapi/domains/base.py index 62b4a09..8cc3536 100644 --- a/autoapi/domains/base.py +++ b/autoapi/domains/base.py @@ -11,6 +11,33 @@ from ..settings import TEMPLATE_DIR class PythonMapperBase(object): + ''' + Base object for JSON -> Python object mapping. + + Subclasses of this object will handle their language specific JSON input, + and map that onto this standard Python object. + Subclasses may also include language-specific attributes on this object. + + Arguments: + + :param obj: JSON object representing this object + :param jinja_env: A template environment for rendering this object + + Required attributes: + + :var str id: A globally unique indentifier for this object. Generally a fully qualified name, including namespace. + :var str name: A short "display friendly" name for this object. + + Optional attributes: + + :var str docstring: The documentation for this object + :var list imports: Imports in this object + :var list children: Children of this object + :var list parameters: Parameters to this object + :var list methods: Methods on this object + + ''' + language = 'base' type = 'base' diff --git a/autoapi/settings.py b/autoapi/settings.py index f47878b..55b1c1c 100644 --- a/autoapi/settings.py +++ b/autoapi/settings.py @@ -1,3 +1,9 @@ +""" +Basic settings for AutoAPI projects. + +You shouldn't need to touch this. +""" + import os SITE_ROOT = os.path.dirname(os.path.realpath(__file__))