Add missing magic properties to TypedDict (#6203)

This commit is contained in:
Áron Ricardo Perez-Lopez
2021-11-08 00:06:14 +01:00
committed by GitHub
parent 50c1f2ab7c
commit a88ae10186

View File

@@ -52,6 +52,9 @@ def IntVar(name: str) -> Any: ... # returns a new TypeVar
# Internal mypy fallback type for all typed dicts (does not exist at runtime)
class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
__required_keys__: frozenset[str]
__optional_keys__: frozenset[str]
__total__: bool
def copy(self: _T) -> _T: ...
# Using NoReturn so that only calls using mypy plugin hook that specialize the signature
# can go through.