Warn on using the :property: flag with .. py:method:: (#10852)

This commit is contained in:
Adam Turner
2022-09-23 18:47:28 +01:00
committed by GitHub
parent 58a4449707
commit 5ce15606dd

View File

@@ -828,6 +828,8 @@ class PyMethod(PyObject):
prefix.append(nodes.Text('classmethod'))
prefix.append(addnodes.desc_sig_space())
if 'property' in self.options:
logger.warning(_('Using the :property: flag with the py:method directive'
'is deprecated, use ".. py:property::" instead.'))
prefix.append(nodes.Text('property'))
prefix.append(addnodes.desc_sig_space())
if 'staticmethod' in self.options: