You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the two expressions to be collapsed by boolean-chained-comparison (PLR1716) are parenthesized with different numbers of parentheses, the fix makes Ruff fail.
$ ruff --versionruff 0.6.8
$ echo'(a < b) and b < c'| ruff check --isolated --preview --select PLR1716 - --fixerror: Fix introduced a syntax error. Reverting all changes.This indicates a bug in Ruff. If you could open an issue at: https://github.com/astral-sh/ruff/issues/new?title=%5BFix%20error%5D...quoting the contents of `-`, the rule codes PLR1716, along with the `pyproject.toml` settings and executed command, we'd be very appreciative!(a < b) and b < c-:1:2: PLR1716 Contains chained boolean comparison that can be simplified |1 | (a < b) and b < c | ^^^^^^^^^^^^^^^^ PLR1716 | = help: Use a single compare expressionFound 1 error.[*] 1 fixable with the `--fix` option.
The text was updated successfully, but these errors were encountered:
…parenthesis (#13527)
Related to #13524
Doesn't offer a valid fix, opting to instead just not offer a fix at
all. If someone points me to a good way to handle parenthesis here I'm
down to try to fix the fix separately, but it looks quite hard.
When the two expressions to be collapsed by
boolean-chained-comparison
(PLR1716) are parenthesized with different numbers of parentheses, the fix makes Ruff fail.The text was updated successfully, but these errors were encountered: