Skip to content

How to enable all rules via CLI but then ignore some via config file? #4237

Answered by dhruvmanila
sueskind asked this question in Q&A
Discussion options

You must be logged in to vote

As per the documentation of rule selection:

CLI options are given higher priority than pyproject.toml options, and the current pyproject.toml file is given higher priority than any inherited pyproject.toml files.

So, this means that the selecting all options through the CLI take precedence over ignoring some of them in config file.

The solution is to switch how you're providing the options:

  • In your pyproject.toml, use select = ["ALL"]
  • Ignore rules through the command-line flag --ignore

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@sueskind
Comment options

@charliermarsh
Comment options

@buhtz
Comment options

@dhruvmanila
Comment options

Answer selected by sueskind
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants