Correct implementation of standard types besides "object" (#1340)

Per https://github.com/python/mypy/issues/2989
This commit is contained in:
mistermocha
2017-06-23 09:45:48 -07:00
committed by Guido van Rossum
parent 4a5ff0bb11
commit 5306d6f5a7
2 changed files with 18 additions and 10 deletions

View File

@@ -10,13 +10,17 @@ from types import CodeType, FrameType, TracebackType
overload = object()
Any = object()
TypeVar = object()
Generic = object()
Tuple = object()
Callable = object()
Type = object()
_promote = object()
no_type_check = object()
ClassVar = object()
class _SpecialForm:
def __getitem__(self, typeargs: Any) -> Any: ...
Tuple: _SpecialForm = ...
Generic: _SpecialForm = ...
Callable: _SpecialForm = ...
Type: _SpecialForm = ...
ClassVar: _SpecialForm = ...
class GenericMeta(type): ...