summaryrefslogtreecommitdiff
path: root/sphinx/directives/patches.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/directives/patches.py')
-rw-r--r--sphinx/directives/patches.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/sphinx/directives/patches.py b/sphinx/directives/patches.py
index 8a27c0170..c4535e119 100644
--- a/sphinx/directives/patches.py
+++ b/sphinx/directives/patches.py
@@ -8,7 +8,7 @@
import warnings
from typing import Any, Dict, List, Tuple
-from typing import cast
+from typing import TYPE_CHECKING, cast
from docutils import nodes
from docutils.nodes import Node, make_id, system_message
@@ -22,8 +22,7 @@ from sphinx.domains.math import MathDomain
from sphinx.util.docutils import SphinxDirective
from sphinx.util.nodes import set_source_info
-if False:
- # For type annotation
+if TYPE_CHECKING:
from sphinx.application import Sphinx