The fix for SIM114 has a bug: it does not take operator precedence into account when combining two expressions with or. It should sometimes add parentheses around one expression or the other.
$ ruff --version
ruff 0.5.6
$ cat sim114.py
if False if True else False:
print(1)
elif True:
print(1)
else:
print(2)
$ python sim114.py
1
$ ruff check --isolated --select SIM114 sim114.py --fix
Found 1 error (1 fixed, 0 remaining).
$ cat sim114.py
if False if True else False or True:
print(1)
else:
print(2)
$ python sim114.py
2
The fix for SIM114 has a bug: it does not take operator precedence into account when combining two expressions with
or. It should sometimes add parentheses around one expression or the other.