Cleanup: use dash for bullet points in generated docs

Follow the user manual style guide.
This commit is contained in:
Campbell Barton
2025-07-27 16:56:21 +10:00
parent 2d0a418a47
commit f7fb02dcf9

View File

@@ -218,10 +218,10 @@ def handle_args():
"Log the output of the API dump and sphinx|latex "
"warnings and errors (default=False).\n"
"If given, save logs in:\n"
"* OUTPUT_DIR/.bpy.log\n"
"* OUTPUT_DIR/.sphinx-build.log\n"
"* OUTPUT_DIR/.sphinx-build_pdf.log\n"
"* OUTPUT_DIR/.latex_make.log"
"- OUTPUT_DIR/.bpy.log\n"
"- OUTPUT_DIR/.sphinx-build.log\n"
"- OUTPUT_DIR/.sphinx-build_pdf.log\n"
"- OUTPUT_DIR/.latex_make.log"
),
required=False,
)
@@ -1105,7 +1105,7 @@ def pymodule2sphinx(basepath, module_name, module, title, module_all_extra):
"\n"
)
for attribute, submod in submodules:
fw("* :mod:`{:s}.{:s}`\n".format(module_name, attribute))
fw("- :mod:`{:s}.{:s}`\n".format(module_name, attribute))
fw("\n")
"""
@@ -1438,7 +1438,7 @@ def pyrna_enum2sphinx(prop, use_empty_descriptions=False):
if ok:
return "".join([
"* ``{:s}``\n"
"- ``{:s}``\n"
"{:s}.\n".format(
identifier,
# Account for multi-line enum descriptions, allowing this to be a block of text.
@@ -1756,14 +1756,14 @@ def pyrna2sphinx(basepath):
if _BPY_STRUCT_FAKE:
for key, descr in descr_items:
if type(descr) == GetSetDescriptorType:
lines.append(" * :class:`{:s}.{:s}`\n".format(_BPY_STRUCT_FAKE, key))
lines.append(" - :class:`{:s}.{:s}`\n".format(_BPY_STRUCT_FAKE, key))
for base in bases:
for prop in base.properties:
lines.append(" * :class:`{:s}.{:s}`\n".format(base.identifier, prop.identifier))
lines.append(" - :class:`{:s}.{:s}`\n".format(base.identifier, prop.identifier))
for identifier, py_prop in base.get_py_properties():
lines.append(" * :class:`{:s}.{:s}`\n".format(base.identifier, identifier))
lines.append(" - :class:`{:s}.{:s}`\n".format(base.identifier, identifier))
if lines:
fw(title_string("Inherited Properties", "-"))
@@ -1781,15 +1781,15 @@ def pyrna2sphinx(basepath):
if _BPY_STRUCT_FAKE:
for key, descr in descr_items:
if type(descr) == MethodDescriptorType:
lines.append(" * :class:`{:s}.{:s}`\n".format(_BPY_STRUCT_FAKE, key))
lines.append(" - :class:`{:s}.{:s}`\n".format(_BPY_STRUCT_FAKE, key))
for base in bases:
for func in base.functions:
lines.append(" * :class:`{:s}.{:s}`\n".format(base.identifier, func.identifier))
lines.append(" - :class:`{:s}.{:s}`\n".format(base.identifier, func.identifier))
for identifier, py_func in base.get_py_functions():
lines.append(" * :class:`{:s}.{:s}`\n".format(base.identifier, identifier))
lines.append(" - :class:`{:s}.{:s}`\n".format(base.identifier, identifier))
for identifier, py_func in base.get_py_c_functions():
lines.append(" * :class:`{:s}.{:s}`\n".format(base.identifier, identifier))
lines.append(" - :class:`{:s}.{:s}`\n".format(base.identifier, identifier))
if lines:
fw(title_string("Inherited Functions", "-"))
@@ -1814,14 +1814,14 @@ def pyrna2sphinx(basepath):
for ref_attr, ref_types in sorted(context_type_map.items()):
for ref_type, _ in ref_types:
if ref_type == struct_id:
fw(" * :mod:`bpy.context.{:s}`\n".format(ref_attr))
fw(" - :mod:`bpy.context.{:s}`\n".format(ref_attr))
del ref_attr, ref_types
for ref in struct.references:
ref_split = ref.split(".")
if len(ref_split) > 2:
ref = ref_split[-2] + "." + ref_split[-1]
fw(" * :class:`{:s}`\n".format(ref))
fw(" - :class:`{:s}`\n".format(ref))
fw("\n")
# Docs last?, disable for now.
@@ -2055,8 +2055,8 @@ def write_rst_index(basepath):
fw("\n")
fw(title_string("Indices", "="))
fw("* :ref:`genindex`\n")
fw("* :ref:`modindex`\n\n")
fw("- :ref:`genindex`\n")
fw("- :ref:`modindex`\n\n")
# Special case, this `bmesh.ops.rst` is extracted from C++ source.
if "bmesh.ops" not in EXCLUDE_MODULES: