Skip to content

RUF100 fails to catch # ruff: noqa #17042

Closed
@ddeepwell

Description

@ddeepwell

Summary

Rule RUF100 (unused no-qa) does not catch unused directives when specified as # ruff: noqa or # ruff: noqa: {code}.

See playground for a simplification of the working example of the following three files:

# ruff.toml
[lint]
select = [ "RUF" ]
# example_missed.py
# ruff: noqa
# example_caught.py
# noqa

Execute command: ruff check

Version

ruff 0.11.2 (4773878 2025-03-21)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions