From d4f7c77f2efd964c1e2c58072a36b4de176760ad Mon Sep 17 00:00:00 2001 From: krysperz2 <106302189+krysperz2@users.noreply.github.com> Date: Wed, 6 Dec 2023 17:46:03 +0530 Subject: [PATCH 1/3] Add "missing description" tag to constant documentation --- doc/tools/make_rst.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index 89308b1ee100..0eab6653102e 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -1074,6 +1074,15 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: if constant.text is not None and constant.text.strip() != "": f.write(f"{format_text_block(constant.text.strip(), constant, state)}") + else: + f.write(".. container:: contribute\n\n\t") + f.write( + translate( + "There is currently no description for this constant. Please help us by :ref:`contributing one `!" + ) + + "\n\n" + ) + f.write("\n\n") From 3cdd847937312f5cac78738cf42819b246ad07c1 Mon Sep 17 00:00:00 2001 From: krysperz2 <106302189+krysperz2@users.noreply.github.com> Date: Wed, 6 Dec 2023 18:20:29 +0530 Subject: [PATCH 2/3] Fix indentation --- doc/tools/make_rst.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index 0eab6653102e..eda7c319edb6 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -1075,13 +1075,13 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: if constant.text is not None and constant.text.strip() != "": f.write(f"{format_text_block(constant.text.strip(), constant, state)}") else: - f.write(".. container:: contribute\n\n\t") - f.write( - translate( - "There is currently no description for this constant. Please help us by :ref:`contributing one `!" - ) - + "\n\n" + f.write(".. container:: contribute\n\n\t") + f.write( + translate( + "There is currently no description for this constant. Please help us by :ref:`contributing one `!" ) + + "\n\n" + ) f.write("\n\n") From 1ea73005028323a8257e785a709be3503d000e09 Mon Sep 17 00:00:00 2001 From: krysperz2 <106302189+krysperz2@users.noreply.github.com> Date: Wed, 6 Dec 2023 18:40:19 +0530 Subject: [PATCH 3/3] Fix formatting --- doc/tools/make_rst.py | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index eda7c319edb6..33cd02c38d87 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -1083,7 +1083,6 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: + "\n\n" ) - f.write("\n\n") # Annotation descriptions