mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Add Protocol and runtime to typing_extensions (#1564)
* Add Protocol and runtime to typing_extensions * Use private type variable * Fix typo * Bound type variable for runtime to only class objects * Conform to version check specification
This commit is contained in:
committed by
Łukasz Langa
parent
485c232409
commit
42e2142f28
7
third_party/2and3/typing_extensions.pyi
vendored
7
third_party/2and3/typing_extensions.pyi
vendored
@@ -11,6 +11,13 @@ from typing import overload as overload
|
||||
from typing import Text as Text
|
||||
from typing import Type as Type
|
||||
from typing import TYPE_CHECKING as TYPE_CHECKING
|
||||
from typing import TypeVar, Any
|
||||
|
||||
_TC = TypeVar('_TC', bound=Type[object])
|
||||
class _SpecialForm:
|
||||
def __getitem__(self, typeargs: Any) -> Any: ...
|
||||
def runtime(cls: _TC) -> _TC: ...
|
||||
Protocol: _SpecialForm = ...
|
||||
|
||||
if sys.version_info >= (3, 3):
|
||||
from typing import ChainMap as ChainMap
|
||||
|
||||
Reference in New Issue
Block a user