-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Ruff 0.0.260
Reproducer:
(sphinx) PS I:\Development\sphinx> ruff -V
ruff 0.0.260
(sphinx) PS I:\Development\sphinx> type bug_sim222.py
a = 'foo'
if a == 'bar' and False: # NoQA: SIM223
pass
if 1 == 2 and False: # NoQA: SIM223
pass
(sphinx) PS I:\Development\sphinx> ruff --isolated --show-source --select SIM bug_sim222.py
bug_sim222.py:3:4: SIM222 [*] Use `True` instead of `... or True`
|
3 | if a == 'bar' and False: # NoQA: SIM223
| ^^^^^^^^^^^^^^^^^^^^ SIM222
|
= help: Replace with `True`
bug_sim222.py:6:4: SIM222 [*] Use `True` instead of `... or True`
|
6 | if 1 == 2 and False: # NoQA: SIM223
| ^^^^^^^^^^^^^^^^ SIM222
|
= help: Replace with `True`
Found 2 errors.
[*] 2 potentially fixable with the --fix option.
(sphinx) PS I:\Development\sphinx> Note that the # NoQA: SIM223 is intentional, this is from a 'TODO' part of a method.
In reducing the error case I wondered if the logic required a variable at all, and hence the second reprodcuer -- clearly this is statically false!
I don't have a guess as to what is causing this, sorry!
Thanks,
Adam
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working