From 020449a1ed76642bd478e8b8135c4c3a7eaed699 Mon Sep 17 00:00:00 2001 From: Utkarsh Gupta Date: Mon, 27 May 2019 12:39:04 +0000 Subject: [PATCH] argparse.pyi: Allow Callable[[Text], _T] (#3013) 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 9e611012e..03b9620d3 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] = ...,