mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
committed by
Guido van Rossum
parent
4230e6f313
commit
bd10d8aad4
@@ -63,6 +63,7 @@ _KT_co = TypeVar('_KT_co', covariant=True) # Key type covariant containers.
|
||||
_VT_co = TypeVar('_VT_co', covariant=True) # Value type covariant containers.
|
||||
_T_contra = TypeVar('_T_contra', contravariant=True) # Ditto contravariant.
|
||||
_TC = TypeVar('_TC', bound=Type[object])
|
||||
_C = TypeVar("_C", bound=Callable)
|
||||
|
||||
def runtime(cls: _TC) -> _TC: ...
|
||||
|
||||
@@ -462,3 +463,6 @@ class NamedTuple(tuple):
|
||||
def _replace(self: _T, **kwargs: Any) -> _T: ...
|
||||
|
||||
def NewType(name: str, tp: Type[_T]) -> Type[_T]: ...
|
||||
|
||||
# This itself is only available during type checking
|
||||
def type_check_only(func_or_cls: _C) -> _C: ...
|
||||
|
||||
@@ -65,6 +65,7 @@ _KT_co = TypeVar('_KT_co', covariant=True) # Key type covariant containers.
|
||||
_VT_co = TypeVar('_VT_co', covariant=True) # Value type covariant containers.
|
||||
_T_contra = TypeVar('_T_contra', contravariant=True) # Ditto contravariant.
|
||||
_TC = TypeVar('_TC', bound=Type[object])
|
||||
_C = TypeVar("_C", bound=Callable)
|
||||
|
||||
def runtime(cls: _TC) -> _TC: ...
|
||||
|
||||
@@ -585,3 +586,6 @@ class NamedTuple(tuple):
|
||||
def _replace(self: _T, **kwargs: Any) -> _T: ...
|
||||
|
||||
def NewType(name: str, tp: Type[_T]) -> Type[_T]: ...
|
||||
|
||||
# This itself is only available during type checking
|
||||
def type_check_only(func_or_cls: _C) -> _C: ...
|
||||
|
||||
Reference in New Issue
Block a user