File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 49
49
supports_membership_test ,
50
50
supports_setitem ,
51
51
)
52
- from pylint .constants import PY310_PLUS
53
52
from pylint .interfaces import HIGH , INFERENCE
54
53
from pylint .typing import MessageDefinitionTuple
55
54
@@ -796,7 +795,7 @@ def _is_c_extension(module_node: InferenceResult) -> bool:
796
795
797
796
def _is_invalid_isinstance_type (arg : nodes .NodeNG ) -> bool :
798
797
# Return True if we are sure that arg is not a type
799
- if PY310_PLUS and isinstance (arg , nodes .BinOp ) and arg .op == "|" :
798
+ if isinstance (arg , nodes .BinOp ) and arg .op == "|" :
800
799
return any (
801
800
_is_invalid_isinstance_type (elt ) and not is_none (elt )
802
801
for elt in (arg .left , arg .right )
@@ -811,7 +810,7 @@ def _is_invalid_isinstance_type(arg: nodes.NodeNG) -> bool:
811
810
return False
812
811
if isinstance (inferred , astroid .Instance ) and inferred .qname () == BUILTIN_TUPLE :
813
812
return False
814
- if PY310_PLUS and isinstance (inferred , bases .UnionType ):
813
+ if isinstance (inferred , bases .UnionType ):
815
814
return any (
816
815
_is_invalid_isinstance_type (elt ) and not is_none (elt )
817
816
for elt in (inferred .left , inferred .right )
Original file line number Diff line number Diff line change 14
14
from pylint .__pkginfo__ import __version__
15
15
from pylint .typing import MessageTypesFullName
16
16
17
- PY310_PLUS = sys .version_info [:2 ] >= (3 , 10 )
18
17
PY311_PLUS = sys .version_info [:2 ] >= (3 , 11 )
19
18
PY312_PLUS = sys .version_info [:2 ] >= (3 , 12 )
20
19
PY314_PLUS = sys .version_info [:2 ] >= (3 , 14 )
You can’t perform that action at this time.
0 commit comments