diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-03-07 11:30:01 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-03-07 19:36:41 +0900 |
commit | 941bf951acda5a27b6ff5adef6678c974b6615ba (patch) | |
tree | 21ebcfdeac2d917763b1bb155c08e9da9d4a548f /sphinx/util/docutils.py | |
parent | 3b87df07ff0e875564684cf278427e31d7d4548d (diff) | |
download | sphinx-git-941bf951acda5a27b6ff5adef6678c974b6615ba.tar.gz |
Hello TYPE_CHECKING!
Diffstat (limited to 'sphinx/util/docutils.py')
-rw-r--r-- | sphinx/util/docutils.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sphinx/util/docutils.py b/sphinx/util/docutils.py index 32b90a332..f211b5d0d 100644 --- a/sphinx/util/docutils.py +++ b/sphinx/util/docutils.py @@ -16,7 +16,7 @@ from distutils.version import LooseVersion from os import path from types import ModuleType from typing import Any, Callable, Dict, Generator, IO, List, Optional, Set, Tuple, Type -from typing import cast +from typing import TYPE_CHECKING, cast import docutils from docutils import nodes @@ -34,8 +34,7 @@ from sphinx.util.typing import RoleFunction logger = logging.getLogger(__name__) report_re = re.compile('^(.+?:(?:\\d+)?): \\((DEBUG|INFO|WARNING|ERROR|SEVERE)/(\\d+)?\\) ') -if False: - # For type annotation +if TYPE_CHECKING: from sphinx.builders import Builder from sphinx.config import Config from sphinx.environment import BuildEnvironment |