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
The fix for unnecessary-round (RUF057) in Ruff 0.9.2 can introduce a syntax error or change behavior when the argument to round contains a newline.
Here is a crash:
$ cat ruf057_1.pyround(-1)
$ ruff --isolated check --fix --preview --select RUF057 ruf057_1.pyerror: 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 `ruf057_1.py`, the rule codes RUF057, along with the `pyproject.toml` settings and executed command, we'd be very appreciative!ruf057_1.py:1:1: RUF057 Value being rounded is already an integer |1 | / round(-2 | | 1) | |__^ RUF057 | = help: Remove unnecessary `round` callFound 1 error.[*] 1 fixable with the `--fix` option.
The fix for
unnecessary-round
(RUF057) in Ruff 0.9.2 can introduce a syntax error or change behavior when the argument toround
contains a newline.Here is a crash:
Here is a syntax error:
Here is a runtime behavior change:
The text was updated successfully, but these errors were encountered: