diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-01-01 13:51:59 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-01-01 16:53:23 +0300 |
commit | 918086b5590763663c1627578085e528f1358384 (patch) | |
tree | 9b3cf3a287ef7a1c54e35d602e5d6ce1600fa90c /sphinx/domains | |
parent | 9cac2001f789a095101b8834ce09fcbb02e741e2 (diff) |
Close #5977: :var: field do not create a cross-reference
Since its beginning, `:var:` field has created a cross-reference to the
attribute having the same name. It is meaningful only if the attribute
is documented by `py:attribute` directive. It means the `:var:` field
and `:attr:` role are almost the same and conflicted. Additionally,
the cross-reference points incorrect variable if the target is not
documented.
Thus, the cross-reference feature of `:var:` field is disabled.
Diffstat (limited to 'sphinx/domains')
-rw-r--r-- | sphinx/domains/python.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index 000e2e8d3..5afe2993a 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -354,7 +354,7 @@ class PyObject(ObjectDescription): 'keyword', 'kwarg', 'kwparam'), typerolename='class', typenames=('paramtype', 'type'), can_collapse=True), - PyTypedField('variable', label=_('Variables'), rolename='obj', + PyTypedField('variable', label=_('Variables'), names=('var', 'ivar', 'cvar'), typerolename='class', typenames=('vartype',), can_collapse=True), |