Skip to content

Commit

Permalink
Use Generator TypeVar defaults (#18384)
Browse files Browse the repository at this point in the history
`collections.abc.Generator` doesn't check the number of TypeVars (in
contrast to `typing.Generator`). So it's possible to use
`Generator[None]` even for Python 3.9.
  • Loading branch information
cdce8p authored Dec 30, 2024
1 parent 1c427e7 commit 60bff6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypyc/irbuild/match.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def bind_as_pattern(self, value: Value, new_block: bool = False) -> None:
self.builder.goto(self.code_block)

@contextmanager
def enter_subpattern(self, subject: Value) -> Generator[None, None, None]:
def enter_subpattern(self, subject: Value) -> Generator[None]:
old_subject = self.subject
self.subject = subject
yield
Expand Down

0 comments on commit 60bff6c

Please sign in to comment.