Cleanup: pep8
[blender.git] / doc / python_api / sphinx_changelog_gen.py
index 0b083c31c58b6292b3e7ce7c713b3871cafde712..4cbb418e326fe788ca376cbb4cfdc1d0bc1a8109 100644 (file)
@@ -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