diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-01-07 22:43:25 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-02-11 16:41:19 +0900 |
commit | b25deb259e55a1296332d32712676a2988d7fb06 (patch) | |
tree | 7d87441f07b23d6312d5bece89af72cf16aa41fc /sphinx/util/pycompat.py | |
parent | d40ce68c7b2b02603725cf3072262ebcc82b40fe (diff) | |
download | sphinx-git-b25deb259e55a1296332d32712676a2988d7fb06.tar.gz |
refactor: Move NoneType to sphinx.util.typing
Diffstat (limited to 'sphinx/util/pycompat.py')
-rw-r--r-- | sphinx/util/pycompat.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sphinx/util/pycompat.py b/sphinx/util/pycompat.py index 51697432e..ddacd0a8e 100644 --- a/sphinx/util/pycompat.py +++ b/sphinx/util/pycompat.py @@ -18,7 +18,7 @@ from sphinx.deprecation import RemovedInSphinx40Warning, deprecated_alias from sphinx.locale import __ from sphinx.util import logging from sphinx.util.console import terminal_safe - +from sphinx.util.typing import NoneType if False: # For type annotation @@ -28,8 +28,6 @@ if False: logger = logging.getLogger(__name__) -NoneType = type(None) - # ------------------------------------------------------------------------------ # Python 2/3 compatibility @@ -95,6 +93,7 @@ def execfile_(filepath, _globals, open=open): deprecated_alias('sphinx.util.pycompat', { + 'NoneType': NoneType, # type: ignore 'TextIOWrapper': io.TextIOWrapper, 'htmlescape': html.escape, 'indent': textwrap.indent, |