From: Vladimír Vondruš
Date: Mon, 13 Feb 2023 20:27:03 +0000 (+0100)
Subject: documentation/python: test using :property: in a class docstring.
X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=992d09221fbfd79130e2f63263057a4d73e6c777;p=blog.git
documentation/python: test using :property: in a class docstring.
It works, I just wasn't sure if there wasn't something special regarding
docstrings so I had to check explicitly.
---
diff --git a/documentation/test_python/content_parse_docstrings/content_parse_docstrings.Class.html b/documentation/test_python/content_parse_docstrings/content_parse_docstrings.Class.html
index 164eacfe..e9a1ea74 100644
--- a/documentation/test_python/content_parse_docstrings/content_parse_docstrings.Class.html
+++ b/documentation/test_python/content_parse_docstrings/content_parse_docstrings.Class.html
@@ -44,6 +44,10 @@ even from a summary.
a_property: float get
The a_property has a serious docstring.
+
+ another_property get
+
+ This property is documented in the class
diff --git a/documentation/test_python/content_parse_docstrings/content_parse_docstrings.py b/documentation/test_python/content_parse_docstrings/content_parse_docstrings.py
index c248a4c2..7e7f9de1 100644
--- a/documentation/test_python/content_parse_docstrings/content_parse_docstrings.py
+++ b/documentation/test_python/content_parse_docstrings/content_parse_docstrings.py
@@ -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.