From 969b8dcaeda59814806d9e4c5d5cc6e7b7df8337 Mon Sep 17 00:00:00 2001 From: Utkarsh Gupta Date: Mon, 27 May 2019 16:46:10 +0530 Subject: [PATCH] argparse.pyi: Allow Callable[[Text], _T] Fixes #2988 --- stdlib/2and3/argparse.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/2and3/argparse.pyi b/stdlib/2and3/argparse.pyi index 9e611012ea73..03b9620d3225 100644 --- a/stdlib/2and3/argparse.pyi +++ b/stdlib/2and3/argparse.pyi @@ -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] = ...,