Skip to content

Commit 4d871d8

Browse files
authored
Make self a positional-only argument in all update overloads
Before, overriding this function without the type-checker complaining was impossible, because the overloads hat different requirements for self (positional-only vs. positional or keyword) that could not be fulfilled by a single function implementation. Fixes #15310
1 parent 35b688e commit 4d871d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/typing.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ class MutableMapping(Mapping[_KT, _VT]):
840840
@overload
841841
def update(self: SupportsGetItem[str, _VT], m: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None: ...
842842
@overload
843-
def update(self: SupportsGetItem[str, _VT], **kwargs: _VT) -> None: ...
843+
def update(self: SupportsGetItem[str, _VT], /, **kwargs: _VT) -> None: ...
844844

845845
Text = str
846846

0 commit comments

Comments
 (0)