diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-05-17 10:17:31 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-05-17 10:26:01 +0300 |
commit | 847ec075eb52664a9943b35dda6eb80acfc4f1cf (patch) | |
tree | eac558379fe7907804d13438f9712014f9d0090e /doc | |
parent | 02cbc3c1e0be505724eb79f15d75adf6089063fe (diff) |
Cleanup: pep8
Diffstat (limited to 'doc')
-rw-r--r-- | doc/python_api/examples/bpy.ops.2.py | 2 | ||||
-rw-r--r-- | doc/python_api/sphinx_doc_gen.py | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/doc/python_api/examples/bpy.ops.2.py b/doc/python_api/examples/bpy.ops.2.py index 87a2022e526..dd88c73d5e9 100644 --- a/doc/python_api/examples/bpy.ops.2.py +++ b/doc/python_api/examples/bpy.ops.2.py @@ -1,6 +1,6 @@ +""" .. _operator-execution_context: -""" Execution Context ----------------- diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 72ddf251946..e5ce4c76142 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -455,9 +455,11 @@ ClassMethodDescriptorType = type(dict.__dict__['fromkeys']) MethodDescriptorType = type(dict.get) GetSetDescriptorType = type(int.real) StaticMethodType = type(staticmethod(lambda: None)) -from types import (MemberDescriptorType, - MethodType, - ) +from types import ( + MemberDescriptorType, + MethodType, + FunctionType, + ) _BPY_STRUCT_FAKE = "bpy_struct" _BPY_PROP_COLLECTION_FAKE = "bpy_prop_collection" @@ -869,7 +871,7 @@ def pymodule2sphinx(basepath, module_name, module, title): module_dir_value_type.sort(key=lambda triple: str(triple[2])) for attribute, value, value_type in module_dir_value_type: - if value_type == types.FunctionType: + if value_type == FunctionType: pyfunc2sphinx("", fw, module_name, None, attribute, value, is_class=False) elif value_type in {types.BuiltinMethodType, types.BuiltinFunctionType}: # both the same at the moment but to be future proof # note: can't get args from these, so dump the string as is @@ -939,7 +941,7 @@ def pymodule2sphinx(basepath, module_name, module, title): # needed for pure python classes for key, descr in descr_items: - if type(descr) == types.FunctionType: + if type(descr) == FunctionType: pyfunc2sphinx(" ", fw, module_name, type_name, key, descr, is_class=True) for key, descr in descr_items: |