Commit: e20d306ffa8a935212715b58f5ff71e589a76c39
Author: Campbell Barton
Date:   Sat Jul 30 18:39:22 2016 +1000
Branches: master
https://developer.blender.org/rBe20d306ffa8a935212715b58f5ff71e589a76c39

Cleanup: pep8

===================================================================

M       doc/python_api/sphinx_changelog_gen.py
M       doc/python_api/sphinx_doc_gen.py

===================================================================

diff --git a/doc/python_api/sphinx_changelog_gen.py 
b/doc/python_api/sphinx_changelog_gen.py
index 0b083c3..4cbb418 100644
--- a/doc/python_api/sphinx_changelog_gen.py
+++ b/doc/python_api/sphinx_changelog_gen.py
@@ -48,7 +48,8 @@ python doc/python_api/sphinx_changelog_gen.py -- \
 '''
 {"module.name":
     {"parent.class":
-        {"basic_type", "member_name": ("Name", type, range, length, default, 
descr, f_args, f_arg_types, f_ret_types)}, ...
+        {"basic_type", "member_name":
+            ("Name", type, range, length, default, descr, f_args, f_arg_types, 
f_ret_types)}, ...
     }, ...
 }
 '''
@@ -99,34 +100,34 @@ def api_dump():
                 prop_range = None
 
             dump_class[prop_id] = (
-                    "prop_rna",                 # basic_type
-                    prop.name,                  # name
-                    prop_type,                  # type
-                    prop_range,                 # range
-                    prop_length,                # length
-                    prop.default,               # default
-                    prop.description,           # descr
-                    Ellipsis,                   # f_args
-                    Ellipsis,                   # f_arg_types
-                    Ellipsis,                   # f_ret_types
-                    )
+                "prop_rna",                 # basic_type
+                prop.name,                  # name
+                prop_type,                  # type
+                prop_range,                 # range
+                prop_length,                # length
+                prop.default,               # default
+                prop.description,           # descr
+                Ellipsis,                   # f_args
+                Ellipsis,                   # f_arg_types
+                Ellipsis,                   # f_ret_types
+            )
         del props
 
         # python props, tricky since we dont know much about them.
         for prop_id, attr in struct_info.get_py_properties():
 
             dump_class[prop_id] = (
-                    "prop_py",                  # basic_type
-                    Ellipsis,                   # name
-                    Ellipsis,                   # type
-                    Ellipsis,                   # range
-                    Ellipsis,                   # length
-                    Ellipsis,                   # default
-                    attr.__doc__,               # descr
-                    Ellipsis,                   # f_args
-                    Ellipsis,                   # f_arg_types
-                    Ellipsis,                   # f_ret_types
-                    )
+                "prop_py",                  # basic_type
+                Ellipsis,                   # name
+                Ellipsis,                   # type
+                Ellipsis,                   # range
+                Ellipsis,                   # length
+                Ellipsis,                   # default
+                attr.__doc__,               # descr
+                Ellipsis,                   # f_args
+                Ellipsis,                   # f_arg_types
+                Ellipsis,                   # f_ret_types
+            )
 
         # kludge func -> props
         funcs = [(func.identifier, func) for func in struct_info.functions]
@@ -137,17 +138,17 @@ def api_dump():
             func_args_type = tuple([prop.type for prop in func.args])
 
             dump_class[func_id] = (
-                    "func_rna",                 # basic_type
-                    Ellipsis,                   # name
-                    Ellipsis,                   # type
-                    Ellipsis,                   # range
-                    Ellipsis,                   # length
-                    Ellipsis,                   # default
-                    func.description,           # descr
-                    func_args_ids,              # f_args
-                    func_args_type,             # f_arg_types
-                    func_ret_types,             # f_ret_types
-                    )
+                "func_rna",                 # basic_type
+                Ellipsis,                   # name
+                Ellipsis,                   # type
+                Ellipsis,                   # range
+                Ellipsis,                   # length
+                Ellipsis,                   # default
+                func.description,           # descr
+                func_args_ids,              # f_args
+                func_args_type,             # f_arg_types
+                func_ret_types,             # f_ret_types
+            )
         del funcs
 
         # kludge func -> props
@@ -158,17 +159,17 @@ def api_dump():
             func_args_ids = tuple(inspect.getargspec(attr).args)
 
             dump_class[func_id] = (
-                    "func_py",                  # basic_type
-                    Ellipsis,                   # name
-                    Ellipsis,                   # type
-                    Ellipsis,                   # range
-                    Ellipsis,                   # length
-                    Ellipsis,                   # default
-                    attr.__doc__,               # descr
-                    func_args_ids,              # f_args
-                    Ellipsis,                   # f_arg_types
-                    Ellipsis,                   # f_ret_types
-                    )
+                "func_py",                  # basic_type
+                Ellipsis,                   # name
+                Ellipsis,                   # type
+                Ellipsis,                   # range
+                Ellipsis,                   # length
+                Ellipsis,                   # default
+                attr.__doc__,               # descr
+                func_args_ids,              # f_args
+                Ellipsis,                   # f_arg_types
+                Ellipsis,                   # f_ret_types
+            )
         del funcs
 
     import pprint
@@ -336,15 +337,19 @@ def main():
 
     parser = argparse.ArgumentParser(description=usage_text, epilog=epilog)
 
-    parser.add_argument("--dump", dest="dump", action='store_true',
-            help="When set the api will be dumped into blender_version.py")
-
-    parser.add_argument("--api_from", dest="api_from", metavar='FILE',
-            help="File to compare from (previous version)")
-    parser.add_argument("--api_to", dest="api_to", metavar='FILE',
-            help="File to compare from (current)")
-    parser.add_argument("--api_out", dest="api_out", metavar='FILE',
-            help="Output sphinx changelog")
+    parser.add_argument(
+        "--dump", dest="dump", action='store_true',
+        help="When set the api will be dumped into blender_version.py")
+
+    parser.add_argument(
+        "--api_from", dest="api_from", metavar='FILE',
+        help="File to compare from (previous version)")
+    parser.add_argument(
+        "--api_to", dest="api_to", metavar='FILE',
+        help="File to compare from (current)")
+    parser.add_argument(
+        "--api_out", dest="api_out", metavar='FILE',
+        help="Output sphinx changelog")
 
     args = parser.parse_args(argv)  # In this example we wont use the args
 
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 74ff23e..88dcd73 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -181,15 +181,13 @@ def handle_args():
                         dest="log",
                         default=False,
                         action='store_true',
-                        help=(
-                        "Log the output of the api dump and sphinx|latex "
-                        "warnings and errors (default=False).\n"
-                        "If given, save logs in:\n"
-                        "* OUTPUT_DIR/.bpy.log\n"
-                        "* OUTPUT_DIR/.sphinx-build.log\n"
-                        "* OUTPUT_DIR/.sphinx-build_pdf.log\n"
-                        "* OUTPUT_DIR/.latex_make.log",
-                        ),
+                        help="Log the output of the api dump and sphinx|latex "
+                             "warnings and errors (default=False).\n"
+                             "If given, save logs in:\n"
+                             "* OUTPUT_DIR/.bpy.log\n"
+                             "* OUTPUT_DIR/.sphinx-build.log\n"
+                             "* OUTPUT_DIR/.sphinx-build_pdf.log\n"
+                             "* OUTPUT_DIR/.latex_make.log",
                         required=False)
 
     # parse only the args passed after '--'
@@ -228,8 +226,8 @@ if not ARGS.partial:
 
 else:
     # can manually edit this too:
-    #FILTER_BPY_OPS = ("import.scene", )  # allow
-    #FILTER_BPY_TYPES = ("bpy_struct", "Operator", "ID")  # allow
+    # FILTER_BPY_OPS = ("import.scene", )  # allow
+    # FILTER_BPY_TYPES = ("bpy_struct", "Operator", "ID")  # allow
     EXCLUDE_INFO_DOCS = True
     EXCLUDE_MODULES = [
         "aud",
@@ -275,7 +273,7 @@ else:
         "freestyle.shaders",
         "freestyle.types",
         "freestyle.utils",
-        ]
+    ]
 
     # ------
     # Filter
@@ -301,7 +299,9 @@ else:
     del m
     del fnmatch
 
-    BPY_LOGGER.debug("Partial Doc Build, Skipping: %s\n" % "\n                 
            ".join(sorted(EXCLUDE_MODULES)))
+    BPY_LOGGER.debug(
+        "Partial Doc Build, Skipping: %s\n" %
+        "\n                             ".join(sorted(EXCLUDE_MODULES)))
 
     #
     # done filtering
@@ -340,7 +340,7 @@ EXTRA_SOURCE_FILES = (
     "../examples/bge.texture.py",
     "../examples/bmesh.ops.1.py",
     "../examples/bpy.app.translations.py",
-    )
+)
 
 
 # examples
@@ -357,52 +357,59 @@ RST_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, "rst"))
 # extra info, not api reference docs
 # stored in ./rst/info_*
 INFO_DOCS = (
-    ("info_quickstart.rst", "Blender/Python Quickstart: new to 
blender/scripting and want to get your feet wet?"),
-    ("info_overview.rst", "Blender/Python API Overview: a more complete 
explanation of python integration"),
-    ("inf

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to