File tree 1 file changed +7
-0
lines changed 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -122,11 +122,18 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
122
122
argument_default : Optional [_Text ] = ...,
123
123
conflict_handler : _Text = ...,
124
124
add_help : bool = ...) -> None : ...
125
+
126
+ # The type-ignores in these overloads should be temporary. See:
127
+ # https://github.com/python/typeshed/pull/2643#issuecomment-442280277
125
128
@overload
126
129
def parse_args (self , args : Optional [Sequence [_Text ]] = ...) -> Namespace : ...
127
130
@overload
131
+ def parse_args (self , args : Optional [Sequence [_Text ]], namespace : None ) -> Namespace : ... # type: ignore
132
+ @overload
128
133
def parse_args (self , args : Optional [Sequence [_Text ]], namespace : _N ) -> _N : ...
129
134
@overload
135
+ def parse_args (self , * , namespace : None ) -> Namespace : ... # type: ignore
136
+ @overload
130
137
def parse_args (self , * , namespace : _N ) -> _N : ...
131
138
132
139
if sys .version_info >= (3 , 7 ):
You can’t perform that action at this time.
0 commit comments