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-12 09:56:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-05-12 11:23:24 +0300
commit8a231185aaf8b5f0753320bdd5de12538c626524 (patch)
tree5e900ad524d17a9e1ebf44fa3a0cb5713f2c4abd /doc
parent8478c71a7b8f75dcf4855747347ba53639e6aac3 (diff)
Doc: minor fixes
- check for class/static methods assumed nonzero args. - subclass references and set-flag items are now sorted. - use 'order' for Py operator mix-ins, so operator settings don't show in random order.
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/sphinx_doc_gen.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index fab66d56a79..a49378f2f0e 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -633,11 +633,11 @@ def pyfunc2sphinx(ident, fw, module_name, type_name, identifier, py_func, is_cla
func_type = "function"
# ther rest are class methods
- elif arg_str.startswith("(self, "):
- arg_str = "(" + arg_str[7:]
+ elif arg_str.startswith("(self, ") or arg_str == "(self)":
+ arg_str = "()" if (arg_str == "(self)") else ("(" + arg_str[7:])
func_type = "method"
elif arg_str.startswith("(cls, "):
- arg_str = "(" + arg_str[6:]
+ arg_str = "()" if (arg_str == "(cls)") else ("(" + arg_str[6:])
func_type = "classmethod"
else:
func_type = "staticmethod"
@@ -923,7 +923,7 @@ def pymodule2sphinx(basepath, module_name, module, title):
write_example_ref(" ", fw, module_name + "." + type_name)
- descr_items = [(key, descr) for key, descr in sorted(value.__dict__.items()) if not key.startswith("__")]
+ descr_items = [(key, descr) for key, descr in sorted(value.__dict__.items()) if not key.startswith("_")]
for key, descr in descr_items:
if type(descr) == ClassMethodDescriptorType:
@@ -1239,6 +1239,7 @@ def pyrna2sphinx(basepath):
fw("\n\n")
subclass_ids = [s.identifier for s in structs.values() if s.base is struct if not rna_info.rna_id_ignore(s.identifier)]
+ subclass_ids.sort()
if subclass_ids:
fw("subclasses --- \n" + ", ".join((":class:`%s`" % s) for s in subclass_ids) + "\n\n")