Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions stdlib/2/typing.pyi
Original file line numberDiff line numberDiff line change
Expand Up@@ -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: ...

Expand DownExpand Up@@ -467,3 +468,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: ...
4 changes: 4 additions & 0 deletions stdlib/3/typing.pyi
Original file line numberDiff line numberDiff line change
Expand Up@@ -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: ...

Expand DownExpand Up@@ -581,3 +582,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: ...