Skip to content

Rule suggestion: flag # noqa: <rule-code> in favour of # ruff: ignore[<rule-slug>] #26152

Description

@jonathandung

Summary

This rule would obviously be in preview. It would flag each usage of the less readable noqa comment concerning a code recognized by ruff (such as # noqa: F401), and autofix could change these instances to the more self-documenting and maintenance-friendly # ruff: ignore[unused-import] form, such that users may easily transition to the new suppression syntax. (Side note: the playground does not appear to support this yet)

Metadata

Metadata

Assignees

Labels

ruleImplementing or modifying a lint rule

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions