summaryrefslogtreecommitdiff
path: root/sphinx/util/inspect.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/inspect.py')
-rw-r--r--sphinx/util/inspect.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py
index 6fd5c789c..dd27859a0 100644
--- a/sphinx/util/inspect.py
+++ b/sphinx/util/inspect.py
@@ -15,14 +15,14 @@ import re
import sys
import typing
from collections import OrderedDict
+from typing import TYPE_CHECKING
from six import PY2, PY3, StringIO, binary_type, string_types, itervalues
from six.moves import builtins
from sphinx.util import force_decode
-if False:
- # For type annotation
+if TYPE_CHECKING:
from typing import Any, Callable, Dict, List, Tuple, Type # NOQA
memory_address_re = re.compile(r' at 0x[0-9a-f]{8,16}(?=>)', re.IGNORECASE)