argparse.pyi: Allow Callable[[Text], _T] (#3013)

Fixes #2988
This commit is contained in:
Utkarsh Gupta
2019-05-27 12:39:04 +00:00
committed by Sebastian Rittau
parent 53500c8750
commit 020449a1ed

View File

@@ -56,7 +56,7 @@ class _ActionsContainer:
nargs: Union[int, Text] = ...,
const: Any = ...,
default: Any = ...,
type: Union[Callable[[str], _T], FileType] = ...,
type: Union[Callable[[Text], _T], Callable[[str], _T], FileType] = ...,
choices: Iterable[_T] = ...,
required: bool = ...,
help: Optional[Text] = ...,
@@ -254,7 +254,7 @@ class Action(_AttributeHolder):
nargs: Optional[Union[int, Text]] = ...,
const: Any = ...,
default: Any = ...,
type: Optional[Union[Callable[[str], _T], FileType]] = ...,
type: Optional[Union[Callable[[Text], _T], Callable[[str], _T], FileType]] = ...,
choices: Optional[Iterable[_T]] = ...,
required: bool = ...,
help: Optional[Text] = ...,