mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-16 11:01:27 +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:
1 parent
fcb97fe8f1
commit
01c2fa5a14
3 files changed
+74
-33
No files matched your search
+3
-1
@@ -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