mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-01 00:53:23 +08:00
Improve TypeVar stub (#4150)
This commit is contained in:
@@ -9,7 +9,15 @@ import collections # Needed by aliases like DefaultDict, see mypy issue 2986
|
||||
|
||||
overload = object()
|
||||
Any = object()
|
||||
TypeVar = object()
|
||||
|
||||
class TypeVar:
|
||||
__name__: str
|
||||
__bound__: Optional[Type[Any]]
|
||||
__constraints__: Tuple[Type[Any], ...]
|
||||
__covariant__: bool
|
||||
__contravariant__: bool
|
||||
def __init__(self, name: str, *constraints: Type[Any], bound: Optional[Type[Any]] = ..., covariant: bool = ..., contravariant: bool = ...) -> None: ...
|
||||
|
||||
_promote = object()
|
||||
|
||||
class _SpecialForm(object):
|
||||
|
||||
Reference in New Issue
Block a user