mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
stdlib: correct many pos-or-kw arg names in dunder methods (#7451)
This commit is contained in:
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user