Fix #7812: autodoc: crashed when given name is conflicted

Note: this partially reverts #7594 to avoid errors.
This commit is contained in:
Takeshi KOMIYA
2020-06-27 22:05:02 +09:00
parent 5afc77ee27
commit 659846b805
6 changed files with 56 additions and 52 deletions

View File

@@ -85,8 +85,8 @@ def test_methoddescriptor(app):
actual = do_autodoc(app, 'function', 'builtins.int.__add__')
assert list(actual) == [
'',
'.. py:function:: int.__add__(self, value, /)',
' :module: builtins',
'.. py:function:: __add__(self, value, /)',
' :module: builtins.int',
'',
' Return self+value.',
'',