Skip to content

Commit

Permalink
Fix annotation for Python < 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Simon committed Feb 11, 2024
1 parent 30c72e1 commit 1c33add
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypy/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -5129,7 +5129,7 @@ def visit_match_stmt(self, s: MatchStmt) -> None:
def _get_recursive_sub_patterns_map(
self, expr: Expression, typ: Type
) -> dict[Expression, Type]:
sub_patterns_map = dict[Expression, Type]()
sub_patterns_map: dict[Expression, Type] = {}
typ_ = get_proper_type(typ)
if isinstance(expr, TupleExpr) and isinstance(typ_, TupleType):
# When matching a tuple expression with a sequence pattern, narrow individual tuple items
Expand Down

0 comments on commit 1c33add

Please sign in to comment.