diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-03-07 05:30:01 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-03-07 13:36:41 +0300 |
commit | 941bf951acda5a27b6ff5adef6678c974b6615ba (patch) | |
tree | 21ebcfdeac2d917763b1bb155c08e9da9d4a548f /sphinx/application.py | |
parent | 3b87df07ff0e875564684cf278427e31d7d4548d (diff) |
Hello TYPE_CHECKING!
Diffstat (limited to 'sphinx/application.py')
-rw-r--r-- | sphinx/application.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sphinx/application.py b/sphinx/application.py index a24bd9bb9..6eeb3e183 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -19,6 +19,7 @@ from collections import deque from io import StringIO from os import path from typing import Any, Callable, Dict, IO, List, Tuple, Type, Union +from typing import TYPE_CHECKING from docutils import nodes from docutils.nodes import Element, TextElement @@ -53,9 +54,7 @@ from sphinx.util.osutil import abspath, ensuredir, relpath from sphinx.util.tags import Tags from sphinx.util.typing import RoleFunction, TitleGetter -if False: - # For type annotation - from docutils.nodes import Node # NOQA +if TYPE_CHECKING: from sphinx.builders import Builder |