PEP 705: Remove extra `self` parameter from example (#3934)
This commit is contained in:
parent
d7f551c405
commit
77c09421e5
|
@ -353,7 +353,7 @@ Keyword argument typing
|
|||
class Function(Protocol):
|
||||
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
|
||||
|
||||
fn: Function = impl # Accepted by type checker: function signatures are identical
|
||||
|
|
Loading…
Reference in New Issue