Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-05-17 10:17:31 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-05-17 10:26:01 +0300
commit847ec075eb52664a9943b35dda6eb80acfc4f1cf (patch)
treeeac558379fe7907804d13438f9712014f9d0090e /doc
parent02cbc3c1e0be505724eb79f15d75adf6089063fe (diff)
Cleanup: pep8
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/examples/bpy.ops.2.py2
-rw-r--r--doc/python_api/sphinx_doc_gen.py12
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: