File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import sys
8
8
9
9
_T = TypeVar ('_T' )
10
10
_ActionT = TypeVar ('_ActionT' , bound = 'Action' )
11
+ _N = TypeVar ('_N' )
11
12
12
13
if sys .version_info >= (3 ,):
13
14
_Text = str
@@ -121,8 +122,12 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
121
122
argument_default : Optional [_Text ] = ...,
122
123
conflict_handler : _Text = ...,
123
124
add_help : bool = ...) -> None : ...
124
- def parse_args (self , args : Optional [Sequence [_Text ]] = ...,
125
- namespace : Optional [Namespace ] = ...) -> Namespace : ...
125
+ @overload
126
+ def parse_args (self , args : Optional [Sequence [_Text ]] = ...) -> Namespace : ...
127
+ @overload
128
+ def parse_args (self , args : Optional [Sequence [_Text ]], namespace : _N ) -> _N : ...
129
+ @overload
130
+ def parse_args (self , * , namespace : _N ) -> _N : ...
126
131
127
132
if sys .version_info >= (3 , 7 ):
128
133
def add_subparsers (self , title : _Text = ...,
You can’t perform that action at this time.
0 commit comments