File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -173,9 +173,7 @@ def __init__(
173173 flags : List [str ],
174174 action : str ,
175175 default : _ArgumentTypes ,
176- choices : Optional [List [str ]],
177176 arg_help : str ,
178- metavar : str ,
179177 ) -> None :
180178 self .flags = flags
181179 """The name of the argument."""
@@ -186,19 +184,6 @@ def __init__(
186184 self .default = default
187185 """The default value of the argument."""
188186
189- self .choices = choices
190- """A list of possible choices for the argument.
191-
192- None if there are no restrictions.
193- """
194-
195187 # argparse uses % formatting on help strings, so a % needs to be escaped
196188 self .help = arg_help .replace ("%" , "%%" )
197189 """The description of the argument."""
198-
199- self .metavar = metavar
200- """The metavar of the argument.
201-
202- See:
203- https://docs.python.org/3/library/argparse.html#metavar
204- """
Original file line number Diff line number Diff line change @@ -76,8 +76,6 @@ def _add_parser_option(
7676 action = argument .action ,
7777 default = argument .default ,
7878 help = argument .help ,
79- metavar = argument .metavar ,
80- choices = argument .choices ,
8179 )
8280 else :
8381 raise UnrecognizedArgumentAction
Original file line number Diff line number Diff line change @@ -31,9 +31,7 @@ def _convert_option_to_argument(
3131 flags = [f"--{ opt } " ],
3232 action = action ,
3333 default = optdict ["default" ],
34- choices = optdict .get ("choices" , None ),
3534 arg_help = optdict ["help" ],
36- metavar = optdict ["metavar" ],
3735 )
3836 return _Argument (
3937 flags = [f"--{ opt } " ],
You can’t perform that action at this time.
0 commit comments