File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change 9
9
import sys
10
10
from collections .abc import Callable
11
11
from pathlib import Path
12
- from typing import Literal , TypeVar
13
-
14
- if sys .version_info >= (3 , 10 ):
15
- from typing import ParamSpec
16
- else :
17
- from typing_extensions import ParamSpec
12
+ from typing import Literal , ParamSpec , TypeVar
18
13
19
14
_P = ParamSpec ("_P" )
20
15
_ReturnValueT = TypeVar ("_ReturnValueT" , bool , str )
Original file line number Diff line number Diff line change 4
4
5
5
from __future__ import annotations
6
6
7
- import sys
8
- from typing import TYPE_CHECKING , cast
7
+ from typing import TYPE_CHECKING , TypeGuard , cast
9
8
10
9
from astroid import nodes
11
10
16
15
if TYPE_CHECKING :
17
16
from pylint .lint import PyLinter
18
17
19
- if sys .version_info >= (3 , 10 ):
20
- from typing import TypeGuard
21
- else :
22
- from typing_extensions import TypeGuard
23
-
24
18
25
19
class CodeStyleChecker (BaseChecker ):
26
20
"""Checkers that can improve code consistency.
You can’t perform that action at this time.
0 commit comments