mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Annotate TypedDict as _SpecialForm rather than object. (#12985)
* Annotate TypedDict as _SpecialForm rather than object. Let's see if this works... * Get typing_extensions.TypedDict as well, try to fix tests. * Import typing_extensions.TypedDict, delete _SpecialForm.__getitem__. * Back out deletion of _SpecialForm.__getitem__.
This commit is contained in:
@@ -58,6 +58,7 @@ from typing import ( # noqa: Y022,Y037,Y038,Y039
|
||||
TextIO as TextIO,
|
||||
Tuple as Tuple,
|
||||
Type as Type,
|
||||
TypedDict as TypedDict,
|
||||
Union as Union,
|
||||
ValuesView as ValuesView,
|
||||
_Alias,
|
||||
@@ -255,9 +256,6 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
|
||||
# supposedly incompatible definitions of `__ior__` and `__or__`:
|
||||
def __ior__(self, value: Self, /) -> Self: ... # type: ignore[misc]
|
||||
|
||||
# TypedDict is a (non-subscriptable) special form.
|
||||
TypedDict: object
|
||||
|
||||
OrderedDict = _Alias()
|
||||
|
||||
def get_type_hints(
|
||||
|
||||
Reference in New Issue
Block a user