Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-03-07 05:30:01 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-03-07 13:36:41 +0300
commit941bf951acda5a27b6ff5adef6678c974b6615ba (patch)
tree21ebcfdeac2d917763b1bb155c08e9da9d4a548f /sphinx/roles.py
parent3b87df07ff0e875564684cf278427e31d7d4548d (diff)
Hello TYPE_CHECKING!
Diffstat (limited to 'sphinx/roles.py')
-rw-r--r--sphinx/roles.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/roles.py b/sphinx/roles.py
index 45a628533..f7c77c449 100644
--- a/sphinx/roles.py
+++ b/sphinx/roles.py
@@ -11,6 +11,7 @@
import re
import warnings
from typing import Any, Dict, List, Tuple, Type
+from typing import TYPE_CHECKING
from docutils import nodes, utils
from docutils.nodes import Element, Node, TextElement, system_message
@@ -26,8 +27,7 @@ from sphinx.util.nodes import (
)
from sphinx.util.typing import RoleFunction
-if False:
- # For type annotation
+if TYPE_CHECKING:
from sphinx.application import Sphinx
from sphinx.environment import BuildEnvironment