mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Fix various pos-only stubtest complaints previously allowlisted (#7228)
This commit is contained in:
@@ -487,6 +487,7 @@ class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
def pop(self, __key: _KT, default: _VT | _T) -> _VT | _T: ...
|
||||
def popitem(self) -> tuple[_KT, _VT]: ...
|
||||
# This overload should be allowed only if the value type is compatible with None.
|
||||
# Keep OrderedDict.setdefault in line with MutableMapping.setdefault, modulo positional-only differences.
|
||||
@overload
|
||||
def setdefault(self: MutableMapping[_KT, _T | None], __key: _KT) -> _T | None: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user