diff options
author | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2023-01-31 18:30:43 +0000 |
---|---|---|
committer | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2023-01-31 18:30:43 +0000 |
commit | 4c4745af9cc788f94568bb3457f887b8c124f73f (patch) | |
tree | 3cfe20ed3672d3b08de0b1f4cb5d9abf7c19e214 /sphinx/pycode | |
parent | 7395b05b1c03cd675b1d9a232a103934c2348225 (diff) | |
download | sphinx-git-4c4745af9cc788f94568bb3457f887b8c124f73f.tar.gz |
Fix various Ruff errors
Diffstat (limited to 'sphinx/pycode')
-rw-r--r-- | sphinx/pycode/__init__.py | 6 |
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] |