$ ./ruff --no-cache --select UP018 --fix code.py
error: Autofix introduced a syntax error. Reverting all changes.
This indicates a bug in `ruff`. If you could open an issue at:
https://github.com/charliermarsh/ruff/issues/new?title=%5BAutofix%20error%5D
...quoting the contents of `code.py`, the rule codes UP018, along with the `pyproject.toml` settings and executed command, we'd be very appreciative!
code.py:1:4: UP018 Unnecessary call to `str`
Found 1 error.