Merge pull request #7432 from tk0miya/7428_nitpicky_for_None_class

Fix #7428: py domain: a reference to class ``None`` emits a nitpicky warning
This commit is contained in:
Takeshi KOMIYA
2020-04-09 00:38:34 +09:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -16,6 +16,8 @@ Features added
Bugs fixed
----------
* #7428: py domain: a reference to class ``None`` emits a nitpicky warning
Testing
--------

View File

@@ -1311,7 +1311,7 @@ def builtin_resolver(app: Sphinx, env: BuildEnvironment,
if node.get('refdomain') != 'py':
return None
elif node.get('reftype') == 'obj' and node.get('reftarget') == 'None':
elif node.get('reftype') in ('class', 'obj') and node.get('reftarget') == 'None':
return contnode
elif node.get('reftype') in ('class', 'exc'):
reftarget = node.get('reftarget')