PEP 705: Remove extra `self` parameter from example (#3934)

This commit is contained in:
Pavel Karateev 2024-09-03 17:07:09 +02:00 committed by GitHub
parent d7f551c405
commit 77c09421e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -353,7 +353,7 @@ Keyword argument typing
class Function(Protocol): class Function(Protocol):
def __call__(self, **kwargs: Unpack[Args]) -> None: ... def __call__(self, **kwargs: Unpack[Args]) -> None: ...
def impl(self, **kwargs: Unpack[ReadOnlyArgs]) -> None: def impl(**kwargs: Unpack[ReadOnlyArgs]) -> None:
kwargs["key1"] = 3 # Type check error: key1 is readonly kwargs["key1"] = 3 # Type check error: key1 is readonly
fn: Function = impl # Accepted by type checker: function signatures are identical fn: Function = impl # Accepted by type checker: function signatures are identical