Skip to content

Commit 35d73ef

Browse files
authored
type of argument_default should be Any (#4811)
1 parent 1c6ac09 commit 35d73ef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stdlib/2and3/argparse.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class _AttributeHolder:
5151
class _ActionsContainer:
5252
description: Optional[_Text]
5353
prefix_chars: _Text
54-
argument_default: Optional[_Text]
54+
argument_default: Any
5555
conflict_handler: _Text
5656

5757
_registries: Dict[_Text, Dict[Any, Any]]
@@ -63,7 +63,7 @@ class _ActionsContainer:
6363
_negative_number_matcher: Pattern[str]
6464
_has_negative_number_optionals: List[bool]
6565
def __init__(
66-
self, description: Optional[Text], prefix_chars: Text, argument_default: Optional[Text], conflict_handler: Text
66+
self, description: Optional[Text], prefix_chars: Text, argument_default: Any, conflict_handler: Text
6767
) -> None: ...
6868
def register(self, registry_name: Text, value: Any, object: Any) -> None: ...
6969
def _registry_get(self, registry_name: Text, value: Any, default: Any = ...) -> Any: ...
@@ -128,7 +128,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
128128
formatter_class: _FormatterClass = ...,
129129
prefix_chars: str = ...,
130130
fromfile_prefix_chars: Optional[str] = ...,
131-
argument_default: Optional[str] = ...,
131+
argument_default: Any = ...,
132132
conflict_handler: str = ...,
133133
add_help: bool = ...,
134134
allow_abbrev: bool = ...,
@@ -145,7 +145,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
145145
formatter_class: _FormatterClass = ...,
146146
prefix_chars: str = ...,
147147
fromfile_prefix_chars: Optional[str] = ...,
148-
argument_default: Optional[str] = ...,
148+
argument_default: Any = ...,
149149
conflict_handler: str = ...,
150150
add_help: bool = ...,
151151
allow_abbrev: bool = ...,
@@ -161,7 +161,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
161161
formatter_class: _FormatterClass = ...,
162162
prefix_chars: Text = ...,
163163
fromfile_prefix_chars: Optional[Text] = ...,
164-
argument_default: Optional[Text] = ...,
164+
argument_default: Any = ...,
165165
conflict_handler: Text = ...,
166166
add_help: bool = ...,
167167
) -> None: ...

0 commit comments

Comments
 (0)