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>2014-09-18 11:45:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-09-18 11:45:31 +0400
commit90f75b8ce034068f0f8192e32d4b9a6d9261393f (patch)
tree9d56098c6816a02f4396273fd1927b1b234a41ba /doc
parentcf0ce0afc7b79cc42fbf083da0e7deacf54a836f (diff)
Cleanup: use static sets where possible
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/examples/bpy.types.Operator.5.py2
-rw-r--r--doc/python_api/sphinx_doc_gen.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/python_api/examples/bpy.types.Operator.5.py b/doc/python_api/examples/bpy.types.Operator.5.py
index 4a0abcb62c3..78030c7d7c4 100644
--- a/doc/python_api/examples/bpy.types.Operator.5.py
+++ b/doc/python_api/examples/bpy.types.Operator.5.py
@@ -39,7 +39,7 @@ class ModalOperator(bpy.types.Operator):
self.execute(context)
elif event.type == 'LEFTMOUSE': # Confirm
return {'FINISHED'}
- elif event.type in ('RIGHTMOUSE', 'ESC'): # Cancel
+ elif event.type in {'RIGHTMOUSE', 'ESC'}: # Cancel
context.object.location.x = self.init_loc_x
return {'CANCELLED'}
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 1915b039423..0b9a4e6a37b 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -695,7 +695,7 @@ def py_descr2sphinx(ident, fw, descr, module_name, type_name, identifier):
fw(ident + ".. data:: %s\n\n" % identifier)
write_indented_lines(ident + " ", fw, doc, False)
fw("\n")
- elif type(descr) in (MethodDescriptorType, ClassMethodDescriptorType):
+ elif type(descr) in {MethodDescriptorType, ClassMethodDescriptorType}:
write_indented_lines(ident, fw, doc, False)
fw("\n")
else:
@@ -889,7 +889,7 @@ def pymodule2sphinx(basepath, module_name, module, title):
for attribute, value, value_type in module_dir_value_type:
if value_type == types.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
+ 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
# this means any module used like this must have fully formatted docstrings.
py_c_func2sphinx("", fw, module_name, None, attribute, value, is_class=False)
@@ -1871,7 +1871,7 @@ def rna2sphinx(basepath):
if "bpy.context" not in EXCLUDE_MODULES:
# one of a kind, context doc (uses ctypes to extract info!)
# doesn't work on mac and windows
- if PLATFORM not in ["darwin", "windows"]:
+ if PLATFORM not in {"darwin", "windows"}:
pycontext2sphinx(basepath)
# internal modules