Skip to content

Commit 60bff6c

Browse files
authored
Use Generator TypeVar defaults (#18384)
`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.
1 parent 1c427e7 commit 60bff6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypyc/irbuild/match.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def bind_as_pattern(self, value: Value, new_block: bool = False) -> None:
332332
self.builder.goto(self.code_block)
333333

334334
@contextmanager
335-
def enter_subpattern(self, subject: Value) -> Generator[None, None, None]:
335+
def enter_subpattern(self, subject: Value) -> Generator[None]:
336336
old_subject = self.subject
337337
self.subject = subject
338338
yield

0 commit comments

Comments
 (0)