Skip to content

Commit 4a742e8

Browse files
committed
Remove the unnecessary logic which checks if the version of Python is 3.10 or
higher.
1 parent e54d1ec commit 4a742e8

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

pylint/checkers/match_statements_checker.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ class MatchStatementChecker(BaseChecker):
3030
)
3131
}
3232

33-
def open(self) -> None:
34-
py_version = self.linter.config.py_version
35-
self._py310_plus = py_version >= (3, 10)
36-
3733
@only_required_for_messages("unreachable-match-patterns")
3834
def visit_match(self, node: nodes.Match) -> None:
3935
"""Check if a name capture pattern prevents the other cases from being
@@ -45,7 +41,6 @@ def visit_match(self, node: nodes.Match) -> None:
4541
and case.pattern.pattern is None
4642
and isinstance(case.pattern.name, nodes.AssignName)
4743
and idx < len(node.cases) - 1
48-
and self._py310_plus
4944
):
5045
self.add_message(
5146
"unreachable-match-patterns",

0 commit comments

Comments
 (0)