Skip to content

Commit

Permalink
Close sphinx-doc#7246: Drop special cross reference helper for except…
Browse files Browse the repository at this point in the history
…ions, functions and methods
  • Loading branch information
tk0miya committed Mar 7, 2020
1 parent 0e89979 commit 75190ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Expand Up @@ -35,6 +35,8 @@ Incompatible changes
modules have node_id for cross reference
* #6903: py domain: Non intended behavior is removed such as ``say_hello_``
links to ``.. py:function:: say_hello()``
* #7246: py domain: Drop special cross reference helper for exceptions,
functions and methods

Deprecated
----------
Expand Down
8 changes: 0 additions & 8 deletions sphinx/domains/python.py
Expand Up @@ -1110,14 +1110,6 @@ def find_obj(self, env: BuildEnvironment, modname: str, classname: str,
elif modname and classname and \
modname + '.' + classname + '.' + name in self.objects:
newname = modname + '.' + classname + '.' + name
# special case: builtin exceptions have module "exceptions" set
elif type == 'exc' and '.' not in name and \
'exceptions.' + name in self.objects:
newname = 'exceptions.' + name
# special case: object methods
elif type in ('func', 'meth') and '.' not in name and \
'object.' + name in self.objects:
newname = 'object.' + name
if newname is not None:
matches.append((newname, self.objects[newname]))
return matches
Expand Down

0 comments on commit 75190ec

Please sign in to comment.