summaryrefslogtreecommitdiffstats
path: root/doc/tools/make_rst.py
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-09-04 18:55:49 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-09-04 18:55:49 +0200
commitcb21a207b3ee2e6060c3bf6a5f49f1d33d1af792 (patch)
treef6bbaaf2ffa52336044e9355425ac968f367533a /doc/tools/make_rst.py
parent82799d7687f8df66c4c8b59de1077d89078f69fa (diff)
parent2dd043d1f615cfe054c3333319a6e1862955bfee (diff)
downloadredot-engine-cb21a207b3ee2e6060c3bf6a5f49f1d33d1af792.tar.gz
Merge pull request #96555 from dalexeev/doc-theme-items-deprecated-experimental
Docs: Add missing deprecated/experimental tag support for theme items
Diffstat (limited to 'doc/tools/make_rst.py')
-rwxr-xr-xdoc/tools/make_rst.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py
index 761a7f8f4a..29e10ea490 100755
--- a/doc/tools/make_rst.py
+++ b/doc/tools/make_rst.py
@@ -1311,9 +1311,6 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
if property_def.text is not None and property_def.text.strip() != "":
f.write(f"{format_text_block(property_def.text.strip(), property_def, state)}\n\n")
- if property_def.type_name.type_name in PACKED_ARRAY_TYPES:
- tmp = f"[b]Note:[/b] The returned array is [i]copied[/i] and any changes to it will not update the original property value. See [{property_def.type_name.type_name}] for more details."
- f.write(f"{format_text_block(tmp, property_def, state)}\n\n")
elif property_def.deprecated is None and property_def.experimental is None:
f.write(".. container:: contribute\n\n\t")
f.write(
@@ -1323,6 +1320,11 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
+ "\n\n"
)
+ # Add copy note to built-in properties returning `Packed*Array`.
+ if property_def.type_name.type_name in PACKED_ARRAY_TYPES:
+ copy_note = f"[b]Note:[/b] The returned array is [i]copied[/i] and any changes to it will not update the original property value. See [{property_def.type_name.type_name}] for more details."
+ f.write(f"{format_text_block(copy_note, property_def, state)}\n\n")
+
index += 1
# Constructor, Method, Operator descriptions