mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-16 02:51:28 +08:00
TypeVar(bound) accepts strings for forward references (#4410)
This commit is contained in:
1 parent
439ea4bd8b
commit
4233008b4a
1 file changed
+1
-3
+1
-3
@@ -1,5 +1,3 @@
|
||||
# Stubs for typing
|
||||
|
||||
import collections # Needed by aliases like DefaultDict, see mypy issue 2986
|
||||
import sys
|
||||
from abc import ABCMeta, abstractmethod
|
||||
@@ -21,7 +19,7 @@ class TypeVar:
|
||||
self,
|
||||
name: str,
|
||||
*constraints: Type[Any],
|
||||
bound: Optional[Type[Any]] = ...,
|
||||
bound: Union[None, Type[Any], str] = ...,
|
||||
covariant: bool = ...,
|
||||
contravariant: bool = ...,
|
||||
) -> None: ...
|
||||
|
||||
Reference in new issue
Block a user