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
diff options
context:
space:
mode:
authorAaron Carlisle <carlisle.b3d@gmail.com>2020-07-27 20:01:28 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2020-07-27 20:01:28 +0300
commite893430a6306ded059270e7df9d78180cdc0d9e3 (patch)
tree5336212b7db557ca53e2918e42caa8fba9870b60 /doc/python_api/sphinx_doc_gen.py
parent1ae8855f8e2dfd5aa710fa521be75be0c81a5971 (diff)
Partly revert "Fix T77276: Generating Python API docs raises many warnings"
This commit reverts the "noindex" part of the original commit. using noindex made it imposible to link to a specific property. The original warnings do not pose an issue so until a proper solution is found I am reverting this commit. This reverts commit 953c232db31f1a76f99ceb43119681ce0df1ab17
Diffstat (limited to 'doc/python_api/sphinx_doc_gen.py')
-rw-r--r--doc/python_api/sphinx_doc_gen.py28
1 files changed, 9 insertions, 19 deletions
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 8ad96a6e4f5..2c9445dce97 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -696,13 +696,11 @@ def py_descr2sphinx(ident, fw, descr, module_name, type_name, identifier):
doc = undocumented_message(module_name, type_name, identifier)
if type(descr) == GetSetDescriptorType:
- fw(ident + ".. attribute:: %s\n" % identifier)
- fw(ident + " :noindex:\n\n")
+ fw(ident + ".. attribute:: %s\n\n" % identifier)
write_indented_lines(ident + " ", fw, doc, False)
fw("\n")
elif type(descr) == MemberDescriptorType: # same as above but use 'data'
- fw(ident + ".. data:: %s\n" % identifier)
- fw(ident + " :noindex:\n\n")
+ fw(ident + ".. data:: %s\n\n" % identifier)
write_indented_lines(ident + " ", fw, doc, False)
fw("\n")
elif type(descr) in {MethodDescriptorType, ClassMethodDescriptorType}:
@@ -742,14 +740,11 @@ def pyprop2sphinx(ident, fw, identifier, py_prop):
'''
# readonly properties use "data" directive, variables use "attribute" directive
if py_prop.fset is None:
- fw(ident + ".. data:: %s\n" % identifier)
- fw(ident + " :noindex:\n\n")
+ fw(ident + ".. data:: %s\n\n" % identifier)
else:
- fw(ident + ".. attribute:: %s\n" % identifier)
- fw(ident + " :noindex:\n\n")
+ fw(ident + ".. attribute:: %s\n\n" % identifier)
write_indented_lines(ident + " ", fw, py_prop.__doc__)
if py_prop.fset is None:
- fw("\n")
fw(ident + " (readonly)\n\n")
else:
fw("\n")
@@ -915,8 +910,7 @@ def pymodule2sphinx(basepath, module_name, module, title):
elif issubclass(value_type, (bool, int, float, str, tuple)):
# constant, not much fun we can do here except to list it.
# TODO, figure out some way to document these!
- fw(".. data:: %s\n" % attribute)
- fw(" :noindex:\n\n")
+ fw(".. data:: %s\n\n" % attribute)
write_indented_lines(" ", fw, "constant value %s" % repr(value), False)
fw("\n")
else:
@@ -1126,8 +1120,7 @@ def pycontext2sphinx(basepath):
type_descr = prop.get_type_description(
class_fmt=":class:`bpy.types.%s`", collection_id=_BPY_PROP_COLLECTION_ID)
- fw(".. data:: %s\n" % prop.identifier)
- fw(" :noindex:\n\n")
+ fw(".. data:: %s\n\n" % prop.identifier)
if prop.description:
fw(" %s\n\n" % prop.description)
@@ -1172,8 +1165,7 @@ def pycontext2sphinx(basepath):
i = 0
while char_array[i] is not None:
member = ctypes.string_at(char_array[i]).decode(encoding="ascii")
- fw(".. data:: %s\n" % member)
- fw(" :noindex:\n\n")
+ fw(".. data:: %s\n\n" % member)
member_type, is_seq = context_type_map[member]
fw(" :type: %s :class:`bpy.types.%s`\n\n" % ("sequence of " if is_seq else "", member_type))
unique.add(member)
@@ -1379,11 +1371,9 @@ def pyrna2sphinx(basepath):
type_descr = prop.get_type_description(class_fmt=":class:`%s`", collection_id=_BPY_PROP_COLLECTION_ID)
# readonly properties use "data" directive, variables properties use "attribute" directive
if 'readonly' in type_descr:
- fw(" .. data:: %s\n" % prop.identifier)
- fw(" :noindex:\n\n")
+ fw(" .. data:: %s\n\n" % prop.identifier)
else:
- fw(" .. attribute:: %s\n" % prop.identifier)
- fw(" :noindex:\n\n")
+ fw(" .. attribute:: %s\n\n" % prop.identifier)
if prop.description:
fw(" %s\n\n" % prop.description)