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 4949 supports_membership_test ,
5050 supports_setitem ,
5151)
52- from pylint .constants import PY310_PLUS
5352from pylint .interfaces import HIGH , INFERENCE
5453from pylint .typing import MessageDefinitionTuple
5554
@@ -796,7 +795,7 @@ def _is_c_extension(module_node: InferenceResult) -> bool:
796795
797796def _is_invalid_isinstance_type (arg : nodes .NodeNG ) -> bool :
798797 # 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 == "|" :
800799 return any (
801800 _is_invalid_isinstance_type (elt ) and not is_none (elt )
802801 for elt in (arg .left , arg .right )
@@ -811,7 +810,7 @@ def _is_invalid_isinstance_type(arg: nodes.NodeNG) -> bool:
811810 return False
812811 if isinstance (inferred , astroid .Instance ) and inferred .qname () == BUILTIN_TUPLE :
813812 return False
814- if PY310_PLUS and isinstance (inferred , bases .UnionType ):
813+ if isinstance (inferred , bases .UnionType ):
815814 return any (
816815 _is_invalid_isinstance_type (elt ) and not is_none (elt )
817816 for elt in (inferred .left , inferred .right )
Original file line number Diff line number Diff line change 1414from pylint .__pkginfo__ import __version__
1515from pylint .typing import MessageTypesFullName
1616
17- PY310_PLUS = sys .version_info [:2 ] >= (3 , 10 )
1817PY311_PLUS = sys .version_info [:2 ] >= (3 , 11 )
1918PY312_PLUS = sys .version_info [:2 ] >= (3 , 12 )
2019PY314_PLUS = sys .version_info [:2 ] >= (3 , 14 )
You can’t perform that action at this time.
0 commit comments