chiark / gitweb /
documentation/python: test using :property: in a class docstring.
authorVladimír Vondruš <mosra@centrum.cz>
Mon, 13 Feb 2023 20:27:03 +0000 (21:27 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 13 Feb 2023 20:27:03 +0000 (21:27 +0100)
It works, I just wasn't sure if there wasn't something special regarding
docstrings so I had to check explicitly.

documentation/test_python/content_parse_docstrings/content_parse_docstrings.Class.html
documentation/test_python/content_parse_docstrings/content_parse_docstrings.py

index 164eacfe2bb55d37fc3b66f5bd03302e78c95d0b..e9a1ea74743f2427b91006fbe3b0ca6aea3f041e 100644 (file)
@@ -44,6 +44,10 @@ even from a summary.</p>
               <a href="#a_property" class="m-doc">a_property</a>: float <span class="m-label m-flat m-warning">get</span>
             </dt>
             <dd>The <a class="m-doc" href="content_parse_docstrings.Class.html#a_property">a_property</a> has a <em>serious</em> docstring.</dd>
+            <dt id="another_property">
+              <a href="#another_property" class="m-doc-self">another_property</a> <span class="m-label m-flat m-warning">get</span>
+            </dt>
+            <dd>This property is documented in the class</dd>
           </dl>
         </section>
         <section>
index c248a4c269094611b971e600e1f7721a09c28670..7e7f9de1d4dd03b52a08cab77b4f6e1b5dd05c90 100644 (file)
@@ -9,6 +9,8 @@ class Class:
     With a multi-line summary. Relative reference to :ref:`a_property` works
     even from a summary.
 
+    :property another_property: This property is documented in the class
+
     And class **details** as well."""
 
     @property
@@ -17,6 +19,10 @@ class Class:
 
         And property **details** as well."""
 
+    @property
+    def another_property():
+        pass
+
 class Enum(enum.Enum):
     """This enum has a *serious* docstring. :ref:`VALUE` works from a summary.