From 4d871d8432d43282589fda7b45c5860826adaef4 Mon Sep 17 00:00:00 2001 From: Felix Uhl Date: Sat, 24 Jan 2026 23:41:17 +0100 Subject: [PATCH] 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 --- stdlib/typing.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/typing.pyi b/stdlib/typing.pyi index b1ae6bbdae37..369af41a7ad9 100644 --- a/stdlib/typing.pyi +++ b/stdlib/typing.pyi @@ -840,7 +840,7 @@ class MutableMapping(Mapping[_KT, _VT]): @overload def update(self: SupportsGetItem[str, _VT], m: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None: ... @overload - def update(self: SupportsGetItem[str, _VT], **kwargs: _VT) -> None: ... + def update(self: SupportsGetItem[str, _VT], /, **kwargs: _VT) -> None: ... Text = str