Skip to content

Commit 3b8a020

Browse files
committed
Remove metavar and choices from _StoreTrueArgument
1 parent 9131888 commit 3b8a020

3 files changed

Lines changed: 0 additions & 19 deletions

File tree

pylint/config/argument.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff 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-
"""

pylint/config/arguments_manager.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff 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

pylint/config/utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff 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}"],

0 commit comments

Comments
 (0)