Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUF100 reports unused noqa directive for SIM114, but it is not unused #6122

Closed
tkukushkin opened this issue Jul 27, 2023 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@tkukushkin
Copy link
Contributor

Command:

ruff check --isolated --select RUF100,SIM114 foo.py

foo.py:

if foo:  # noqa: SIM114
    do_something()
elif bar:
    do_something()

Ruff reports:

RUF100 [*] Unused `noqa` directive (unused: `SIM114`)

If I remove noqa directive, it reports:

SIM114 Combine `if` branches using logical `or` operator

ruff version: 0.0.280

I think the problem appeared in 0.0.279, 0.0.278 doesn't have this problem.

@charliermarsh
Copy link
Member

I believe this is fixed by #6031.

@charliermarsh charliermarsh added the bug Something isn't working label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants