mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-17 16:45:05 +08:00
Sync recent typing and typing_extensions updates (#3070)
This includes two things to sync up with recent runtime updates: * Move `Final`, `@final`, `Literal`, and `TypedDict` to `typing` (`typing_extensions` still defines or re-exports them) * Rename `@typing.runtime` to `@typing.runtime_checkable`, while keeping `@runtime` as a backwards-compatible alias in `typing_extensions`.
This commit is contained in:
4
third_party/2and3/typing_extensions.pyi
vendored
4
third_party/2and3/typing_extensions.pyi
vendored
@@ -19,7 +19,9 @@ _F = TypeVar('_F', bound=Callable[..., Any])
|
||||
_TC = TypeVar('_TC', bound=Type[object])
|
||||
class _SpecialForm:
|
||||
def __getitem__(self, typeargs: Any) -> Any: ...
|
||||
def runtime(cls: _TC) -> _TC: ...
|
||||
def runtime_checkable(cls: _TC) -> _TC: ...
|
||||
# This alias for above is kept here for backwards compatibility.
|
||||
runtime = runtime_checkable
|
||||
Protocol: _SpecialForm = ...
|
||||
Final: _SpecialForm = ...
|
||||
def final(f: _F) -> _F: ...
|
||||
|
||||
Reference in New Issue
Block a user