Skip to content

Ignoring commented-out code with noqa: ERA001 triggers RUF100 #1148

@edgarrmondragon

Description

@edgarrmondragon
# commented.py

# print(123)  # noqa: ERA001
# print(123)

This is the result of running Ruff on the above:

$ ruff --version
ruff 0.0.170

$ ruff --select ERA,RUF commented.py
Found 2 error(s).
commented.py:3:15: RUF100 Unused `noqa` directive for: ERA001
commented.py:4:1: ERA001 Found commented-out code
2 potentially fixable with the --fix option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions