Skip to content

Commit

Permalink
Fix sphinx-doc#7428: py domain: a reference to class None emits a…
Browse files Browse the repository at this point in the history
… nitpicky warning
  • Loading branch information
tk0miya committed Apr 7, 2020
1 parent 2def1fc commit b2ab2c6
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 b2ab2c6

Please sign in to comment.