diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-02-06 23:19:36 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-06 23:19:36 +0900 |
commit | 4198219bb1328a85cffd2ee2a9617e7200fefea5 (patch) | |
tree | 42f2004a42c1fe5e396024eaf08a7ec1e5314795 /sphinx/domains/python.py | |
parent | 6b14fcc73110de73956d684ec029bc2628114b79 (diff) | |
parent | ecf7307023a561418a9199f8f0cf1770424c427a (diff) | |
download | sphinx-git-4198219bb1328a85cffd2ee2a9617e7200fefea5.tar.gz |
Merge pull request #7061 from tk0miya/6785_attr_can_refer_props
Fix #6785: py domain: :py:attr: is able to refer properties again
Diffstat (limited to 'sphinx/domains/python.py')
-rw-r--r-- | sphinx/domains/python.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index b5ce9bdbf..3a49d6745 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -1049,6 +1049,11 @@ class PythonDomain(Domain): searchmode = 1 if node.hasattr('refspecific') else 0 matches = self.find_obj(env, modname, clsname, target, type, searchmode) + + if not matches and type == 'attr': + # fallback to meth (for property) + matches = self.find_obj(env, modname, clsname, target, 'meth', searchmode) + if not matches: return None elif len(matches) > 1: |