Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-01-01 13:51:59 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2021-01-01 16:53:23 +0300
commit918086b5590763663c1627578085e528f1358384 (patch)
tree9b3cf3a287ef7a1c54e35d602e5d6ce1600fa90c /sphinx/domains
parent9cac2001f789a095101b8834ce09fcbb02e741e2 (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.py2
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),