mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #7298 from tk0miya/7068_pyproperty_directive
py domain: Add py:property directive to describe a property (refs: #7068)
This commit is contained in:
@@ -316,6 +316,22 @@ The following directives are provided for module and class contents:
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
.. rst:directive:: .. py:property:: name
|
||||
|
||||
Describes an object property.
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
.. rubric:: options
|
||||
|
||||
.. rst:directive:option:: abstractmethod
|
||||
:type: no value
|
||||
|
||||
Indicate the property is abstract.
|
||||
|
||||
.. rst:directive:option:: type: type of the property
|
||||
:type: text
|
||||
|
||||
.. rst:directive:: .. py:method:: name(parameters)
|
||||
|
||||
Describes an object method. The parameters should not include the ``self``
|
||||
@@ -368,6 +384,10 @@ The following directives are provided for module and class contents:
|
||||
|
||||
.. versionadded:: 2.1
|
||||
|
||||
.. deprecated:: 4.0
|
||||
|
||||
Use :rst:dir:`py:property` instead.
|
||||
|
||||
.. rst:directive:option:: staticmethod
|
||||
:type: no value
|
||||
|
||||
@@ -584,6 +604,8 @@ a matching identifier is found:
|
||||
|
||||
Reference a data attribute of an object.
|
||||
|
||||
.. note:: The role is also able to refer to property.
|
||||
|
||||
.. rst:role:: py:exc
|
||||
|
||||
Reference an exception. A dotted name may be used.
|
||||
|
||||
Reference in New Issue
Block a user