mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-10 13:32:26 +08:00
Args for "flexible callable" experimental mypy feature. (#793)
This is the typeshed for the constructors for the Arg types that we'll now be able to pass to Callable. They really just return their type arguments.
This commit is contained in:
committed by
Jukka Lehtosalo
parent
b6a9a05743
commit
6a9d74d1c7
9
third_party/2and3/mypy_extensions.pyi
vendored
9
third_party/2and3/mypy_extensions.pyi
vendored
@@ -1,10 +1,17 @@
|
||||
from typing import Dict, Type, TypeVar, Union
|
||||
from typing import Dict, Type, TypeVar, Optional, Union
|
||||
|
||||
_T = TypeVar('_T')
|
||||
|
||||
|
||||
def TypedDict(typename: str, fields: Dict[str, Type[_T]]) -> Type[dict]: ...
|
||||
|
||||
def Arg(type: _T = ..., name: Optional[str] = ...) -> _T: ...
|
||||
def DefaultArg(type: _T = ..., name: Optional[str] = ...) -> _T: ...
|
||||
def NamedArg(type: _T = ..., name: Optional[str] = ...) -> _T: ...
|
||||
def DefaultNamedArg(type: _T = ..., name: Optional[str] = ...) -> _T: ...
|
||||
def VarArg(type: _T = ...) -> _T: ...
|
||||
def KwArg(type: _T = ...) -> _T: ...
|
||||
|
||||
# Return type that indicates a function does not return.
|
||||
# This type is equivalent to the None type, but the no-op Union is necessary to
|
||||
# distinguish the None type from the None value.
|
||||
|
||||
Reference in New Issue
Block a user