From e0a3fd2a5f43f78f8212b1fda47322c568a05149 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Mon, 14 Mar 2016 14:41:08 +0100 Subject: [PATCH] Allow custom actions --- stdlib/2.7/argparse.pyi | 4 ++-- stdlib/3/argparse.pyi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/2.7/argparse.pyi b/stdlib/2.7/argparse.pyi index 96b213c82..70d586a5e 100644 --- a/stdlib/2.7/argparse.pyi +++ b/stdlib/2.7/argparse.pyi @@ -2,7 +2,7 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any, Sequence +from typing import Any, Sequence, Union SUPPRESS = ... # type: Any OPTIONAL = ... # type: Any @@ -125,7 +125,7 @@ class _ActionsContainer: def get_default(self, dest): ... def add_argument(self, *args: str, - action: str = ..., + action: Union[str, Action] = ..., nargs: str = ..., const: Any = ..., default: Any = ..., diff --git a/stdlib/3/argparse.pyi b/stdlib/3/argparse.pyi index 08ea33ca7..e818583a9 100644 --- a/stdlib/3/argparse.pyi +++ b/stdlib/3/argparse.pyi @@ -2,7 +2,7 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any, Sequence +from typing import Any, Sequence, Union SUPPRESS = ... # type: Any OPTIONAL = ... # type: Any @@ -118,7 +118,7 @@ class _ActionsContainer: def get_default(self, dest): ... def add_argument(self, *args: str, - action: str = ..., + action: Union[str, Action] = ..., nargs: str = ..., const: Any = ..., default: Any = ...,