Skip to content

Commit ce57811

Browse files
committed
pylint: use exit code 32 when ambiguous abbreviated parameters are set in a config file
1 parent eeb8f38 commit ce57811

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pylint/config/arguments_manager.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,12 @@ def _load_default_argument_values(self) -> None:
256256

257257
def _parse_configuration_file(self, arguments: list[str]) -> None:
258258
"""Parse the arguments found in a configuration file into the namespace."""
259-
self.config, parsed_args = self._arg_parser.parse_known_args(
260-
arguments, self.config
261-
)
259+
try:
260+
self.config, parsed_args = self._arg_parser.parse_known_args(
261+
arguments, self.config
262+
)
263+
except SystemExit:
264+
sys.exit(32)
262265
unrecognized_options: list[str] = []
263266
for opt in parsed_args:
264267
if opt.startswith("--"):

0 commit comments

Comments
 (0)