diff options
Diffstat (limited to 'pylint/utils/utils.py')
-rw-r--r-- | pylint/utils/utils.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/pylint/utils/utils.py b/pylint/utils/utils.py index 315811ebf..543d7cbb3 100644 --- a/pylint/utils/utils.py +++ b/pylint/utils/utils.py @@ -24,18 +24,23 @@ import tokenize import warnings from collections.abc import Sequence from io import BufferedReader, BytesIO -from typing import TYPE_CHECKING, Any, List, Pattern, TextIO, Tuple, TypeVar, Union +from typing import ( + TYPE_CHECKING, + Any, + List, + Literal, + Pattern, + TextIO, + Tuple, + TypeVar, + Union, +) from astroid import Module, modutils, nodes from pylint.constants import PY_EXTS from pylint.typing import OptionDict -if sys.version_info >= (3, 8): - from typing import Literal -else: - from typing_extensions import Literal - if TYPE_CHECKING: from pylint.lint import PyLinter |