mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-31 08:34:23 +08:00
Improve __(r)or__ signatures for TypedDict classes (#10565)
This commit is contained in:
@@ -900,8 +900,16 @@ class _TypedDict(Mapping[str, object], metaclass=ABCMeta):
|
||||
def keys(self) -> dict_keys[str, object]: ...
|
||||
def values(self) -> dict_values[str, object]: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
@overload
|
||||
def __or__(self, __value: typing_extensions.Self) -> typing_extensions.Self: ...
|
||||
def __ior__(self, __value: typing_extensions.Self) -> typing_extensions.Self: ...
|
||||
@overload
|
||||
def __or__(self, __value: dict[str, Any]) -> dict[str, object]: ...
|
||||
@overload
|
||||
def __ror__(self, __value: typing_extensions.Self) -> typing_extensions.Self: ...
|
||||
@overload
|
||||
def __ror__(self, __value: dict[str, Any]) -> dict[str, object]: ...
|
||||
# supposedly incompatible definitions of __or__ and __ior__
|
||||
def __ior__(self, __value: typing_extensions.Self) -> typing_extensions.Self: ... # type: ignore[misc]
|
||||
|
||||
@_final
|
||||
class ForwardRef:
|
||||
|
||||
Reference in New Issue
Block a user