mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-20 16:48:27 +08:00
typing: add _ProtocolMeta (#6394)
Co-authored-by: hauntsaninja <> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -53,6 +53,11 @@ Literal: _SpecialForm = ...
|
||||
|
||||
def IntVar(name: str) -> Any: ... # returns a new TypeVar
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
# Technically in 3.6 this inherited from GenericMeta. But let's not reflect that, since
|
||||
# type checkers tend to assume that Protocols all have the ABCMeta metaclass.
|
||||
class _ProtocolMeta(abc.ABCMeta): ...
|
||||
|
||||
# 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]
|
||||
|
||||
Reference in New Issue
Block a user