Skip to content

Commit

Permalink
Only exit after argparse parsing is done
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielNoord committed Apr 2, 2022
1 parent efca390 commit aaeeb33
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pylint/config/config_initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ def _config_initialization(
exc.code = 32
raise

# args_list should now only be a list of files/directories to lint. All options have
# been removed from the list
if not parsed_args_list:
print(linter.help())
sys.exit(32)

# We have loaded configuration from config file and command line. Now, we can
# load plugin specific configuration.
linter.load_plugin_configuration()
Expand All @@ -103,4 +97,10 @@ def _config_initialization(
# Now that plugins are loaded, get list of all fail_on messages, and enable them
linter.enable_fail_on_messages()

# args_list should now only be a list of files/directories to lint. All options have
# been removed from the list
if not parsed_args_list:
print(linter.help())
sys.exit(32)

return parsed_args_list

0 comments on commit aaeeb33

Please sign in to comment.