Skip to content

Clarify documentation for lint.extend-ignore and lint.extend-select settings #18884

@Tedpac

Description

@Tedpac

These settings and their usefulness can be (and have been, from what I've seen in multiple issues) easily misunderstood.

For example, the following configurations are equivalent:

[tool.ruff.lint]
# Configuration 1.
select = ["ALL"] 
extend-select = ["D213"]
extend-ignore = ["D212"]

# Configuration 2.
select = ["ALL", "D213"] 
ignore = ["D212"]

[tool.ruff.lint.pydocstyle]
convention = "google"

On the other hand, it seems that lint.extend-ignore was mistakenly deprecated, and it is confusing to see that lint.extend-ignore is deprecated while lint.extend-select is not.

The documentation should include clear use cases for when these settings are useful. From what I understand, these settings are primarily valuable when:

  • Using the top-level extend setting to inherit from base configurations.
  • Adding rules on top of the default rule set without completely overriding it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationhelp wantedContributions especially welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions