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/directives/code.py | |
parent | 3b87df07ff0e875564684cf278427e31d7d4548d (diff) | |
download | sphinx-git-941bf951acda5a27b6ff5adef6678c974b6615ba.tar.gz |
Hello TYPE_CHECKING!
Diffstat (limited to 'sphinx/directives/code.py')
-rw-r--r-- | sphinx/directives/code.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py index 8c19dd0c5..c743ec69e 100644 --- a/sphinx/directives/code.py +++ b/sphinx/directives/code.py @@ -10,6 +10,7 @@ import sys import warnings from difflib import unified_diff from typing import Any, Dict, List, Tuple +from typing import TYPE_CHECKING from docutils import nodes from docutils.nodes import Element, Node @@ -24,8 +25,7 @@ from sphinx.util import logging from sphinx.util import parselinenos from sphinx.util.docutils import SphinxDirective -if False: - # For type annotation +if TYPE_CHECKING: from sphinx.application import Sphinx logger = logging.getLogger(__name__) |