Skip to content

Do I understand the difference between "--select" and "--extend-select" correct? #10753

Answered by MichaReiser
buhtz asked this question in Q&A
Discussion options

You must be logged in to vote

You're understanding is correct and this is documented here

Another way to think about it is that:

  • select: Replaces the rules or sets the rules explicitly
  • extend-select: Adds new rules to what's configured by select

Today ruff is to old and established to modify that behavior. But it is unusual and it should be taken into account for the next major release to modify that. "extend-select" should be removed and "select" should behave like "extend-select".

extend-select is essential to support configuration inheritance when using the extend option. It is crucial because most users want to add new rules in addition to what the base configuration specifies. However, that's not always the c…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@buhtz
Comment options

@MichaReiser
Comment options

@buhtz
Comment options

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