mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-06-25 18:24:03 +08:00
Copy typechecker-internal symbols to _typeshed._type_checker_internals (#13816)
This commit is contained in:
@@ -220,6 +220,7 @@ class TypeVar:
|
||||
def evaluate_default(self) -> EvaluateFunc | None: ...
|
||||
|
||||
# Used for an undocumented mypy feature. Does not exist at runtime.
|
||||
# Obsolete, use _typeshed._type_checker_internals.promote instead.
|
||||
_promote = object()
|
||||
|
||||
# N.B. Keep this definition in sync with typing_extensions._SpecialForm
|
||||
@@ -564,6 +565,7 @@ class Coroutine(Awaitable[_ReturnT_nd_co], Generic[_YieldT_co, _SendT_nd_contra,
|
||||
|
||||
# NOTE: This type does not exist in typing.py or PEP 484 but mypy needs it to exist.
|
||||
# The parameters correspond to Generator, but the 4th is the original type.
|
||||
# Obsolete, use _typeshed._type_checker_internals.AwaitableGenerator instead.
|
||||
@type_check_only
|
||||
class AwaitableGenerator(
|
||||
Awaitable[_ReturnT_nd_co],
|
||||
@@ -946,6 +948,7 @@ if sys.version_info >= (3, 11):
|
||||
|
||||
# Type constructors
|
||||
|
||||
# Obsolete, will be changed to a function. Use _typeshed._type_checker_internals.NamedTupleFallback instead.
|
||||
class NamedTuple(tuple[Any, ...]):
|
||||
_field_defaults: ClassVar[dict[str, Any]]
|
||||
_fields: ClassVar[tuple[str, ...]]
|
||||
@@ -970,6 +973,7 @@ class NamedTuple(tuple[Any, ...]):
|
||||
|
||||
# Internal mypy fallback type for all typed dicts (does not exist at runtime)
|
||||
# N.B. Keep this mostly in sync with typing_extensions._TypedDict/mypy_extensions._TypedDict
|
||||
# Obsolete, use _typeshed._type_checker_internals.TypedDictFallback instead.
|
||||
@type_check_only
|
||||
class _TypedDict(Mapping[str, object], metaclass=ABCMeta):
|
||||
__total__: ClassVar[bool]
|
||||
|
||||
Reference in New Issue
Block a user