summaryrefslogtreecommitdiff
path: root/sphinx/pycode/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/pycode/__init__.py')
-rw-r--r--sphinx/pycode/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sphinx/pycode/__init__.py b/sphinx/pycode/__init__.py
index 19e478f57..9ffb607db 100644
--- a/sphinx/pycode/__init__.py
+++ b/sphinx/pycode/__init__.py
@@ -6,14 +6,16 @@ import re
import tokenize
from collections import OrderedDict
from importlib import import_module
-from inspect import Signature
from os import path
-from typing import Any
+from typing import TYPE_CHECKING, Any
from zipfile import ZipFile
from sphinx.errors import PycodeError
from sphinx.pycode.parser import Parser
+if TYPE_CHECKING:
+ from inspect import Signature
+
class ModuleAnalyzer:
annotations: dict[tuple[str, str], str]