PyDoc: use string literals for enum values

Use literals since their literal values need to be used in code.
This commit is contained in:
Campbell Barton
2025-06-30 17:10:00 +10:00
parent 42cc65e5b5
commit 0fb80f698a
2 changed files with 18 additions and 6 deletions

View File

@@ -1331,6 +1331,7 @@ def pycontext2sphinx(basepath):
type_descr = prop.get_type_description(
class_fmt=":class:`bpy.types.{:s}`",
mathutils_fmt=":class:`mathutils.{:s}`",
literal_fmt="``{:s}``",
collection_id=_BPY_PROP_COLLECTION_ID,
enum_descr_override=enum_descr_override,
)
@@ -1501,6 +1502,7 @@ def pyrna2sphinx(basepath):
kwargs["class_fmt"] = ":class:`{:s}`"
kwargs["mathutils_fmt"] = ":class:`mathutils.{:s}`"
kwargs["literal_fmt"] = "``{:s}``"
kwargs["collection_id"] = _BPY_PROP_COLLECTION_ID
@@ -1621,6 +1623,7 @@ def pyrna2sphinx(basepath):
type_descr = prop.get_type_description(
class_fmt=":class:`{:s}`",
mathutils_fmt=":class:`mathutils.{:s}`",
literal_fmt="``{:s}``",
collection_id=_BPY_PROP_COLLECTION_ID,
enum_descr_override=enum_descr_override,
)
@@ -1703,6 +1706,7 @@ def pyrna2sphinx(basepath):
type_descr = prop.get_type_description(
as_ret=True, class_fmt=":class:`{:s}`",
mathutils_fmt=":class:`mathutils.{:s}`",
literal_fmt="``{:s}``",
collection_id=_BPY_PROP_COLLECTION_ID,
enum_descr_override=enum_descr_override,
)