Skip to content

Method for enabling specific preview rules #7434

@btjones0

Description

@btjones0

My ruff configuration is structured as a deny list where I've enabled all rules and then disable the rules that I don't want.

In 0.0.289, this looked something like:

preview = true  # added in 0.0.289
select = [
    "ALL",
    # other specific preview codes
]
ignore = [
    "PREVIEW",  # added in 0.0.289
    # other selectors I don't want
]

With the removal of the "PREVIEW" selector in 0.0.290, it doesn't look like there's an easy way to disable all the preview checks that I don't want without either:

  • changing my config to be an allow list rather than a deny list, or
  • explicitly ignoring every preview check that I'm not selecting with it's fully qualified code.

I would love to have some mechanism to select specific preview rules without doing either of these.

Metadata

Metadata

Assignees

Labels

configurationRelated to settings and configurationneeds-decisionAwaiting a decision from a maintainerpreviewRelated to preview mode features

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions