stdlib: correct many pos-or-kw arg names in dunder methods (#7451)

This commit is contained in:
Alex Waygood
2022-03-07 15:40:03 +00:00
committed by GitHub
parent 626ccdaee2
commit f4ae363b56
27 changed files with 153 additions and 162 deletions

View File

@@ -250,15 +250,15 @@ class _Environ(MutableMapping[AnyStr, AnyStr], Generic[AnyStr]):
def __iter__(self) -> Iterator[AnyStr]: ...
def __len__(self) -> int: ...
if sys.version_info >= (3, 9):
def __or__(self, value: Mapping[_T1, _T2]) -> dict[AnyStr | _T1, AnyStr | _T2]: ...
def __ror__(self, value: Mapping[_T1, _T2]) -> dict[AnyStr | _T1, AnyStr | _T2]: ...
def __or__(self, other: Mapping[_T1, _T2]) -> dict[AnyStr | _T1, AnyStr | _T2]: ...
def __ror__(self, other: Mapping[_T1, _T2]) -> dict[AnyStr | _T1, AnyStr | _T2]: ...
# We use @overload instead of a Union for reasons similar to those given for
# overloading MutableMapping.update in stdlib/typing.pyi
# The type: ignore is needed due to incompatible __or__/__ior__ signatures
@overload # type: ignore[misc]
def __ior__(self: Self, value: Mapping[AnyStr, AnyStr]) -> Self: ...
def __ior__(self: Self, other: Mapping[AnyStr, AnyStr]) -> Self: ...
@overload
def __ior__(self: Self, value: Iterable[tuple[AnyStr, AnyStr]]) -> Self: ...
def __ior__(self: Self, other: Iterable[tuple[AnyStr, AnyStr]]) -> Self: ...
environ: _Environ[str]
if sys.platform != "win32":