Skip to content

Commit

Permalink
Merge pull request #7432 from tk0miya/7428_nitpicky_for_None_class
Browse files Browse the repository at this point in the history
Fix #7428: py domain: a reference to class ``None`` emits a nitpicky warning
  • Loading branch information
tk0miya committed Apr 8, 2020
2 parents 2def1fc + b2ab2c6 commit 4caa7d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES
Expand Up @@ -16,6 +16,8 @@ Features added
Bugs fixed
----------

* #7428: py domain: a reference to class ``None`` emits a nitpicky warning

Testing
--------

Expand Down
2 changes: 1 addition & 1 deletion sphinx/domains/python.py
Expand Up @@ -1311,7 +1311,7 @@ def istyping(s: str) -> bool:

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')
Expand Down

0 comments on commit 4caa7d7

Please sign in to comment.