Skip to content

Commit 020449a

Browse files
utkarsh2102srittau
authored andcommitted
argparse.pyi: Allow Callable[[Text], _T] (#3013)
Fixes #2988
1 parent 53500c8 commit 020449a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/2and3/argparse.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class _ActionsContainer:
5656
nargs: Union[int, Text] = ...,
5757
const: Any = ...,
5858
default: Any = ...,
59-
type: Union[Callable[[str], _T], FileType] = ...,
59+
type: Union[Callable[[Text], _T], Callable[[str], _T], FileType] = ...,
6060
choices: Iterable[_T] = ...,
6161
required: bool = ...,
6262
help: Optional[Text] = ...,
@@ -254,7 +254,7 @@ class Action(_AttributeHolder):
254254
nargs: Optional[Union[int, Text]] = ...,
255255
const: Any = ...,
256256
default: Any = ...,
257-
type: Optional[Union[Callable[[str], _T], FileType]] = ...,
257+
type: Optional[Union[Callable[[Text], _T], Callable[[str], _T], FileType]] = ...,
258258
choices: Optional[Iterable[_T]] = ...,
259259
required: bool = ...,
260260
help: Optional[Text] = ...,

0 commit comments

Comments
 (0)