Ruff 0.0.287 (latest changes from main branch)
ruff *.py --select UP037 --no-cache --fix
file content(at least simple cpython script shows that this is valid python file):
from __future__ import annotations
class IdentityLinearOperator(ConstantDiagLinearOperator):
def _mul_matrix(
other: Union[Float[torch.Tensor, "... #M #N"], Float[LinearOperator, "... #M #N"]],
) -> Float[LinearOperator, "... M N"]:
return other
error
/home/rafal/test/tmp_folder/2589347.py:4:42: UP037 Remove quotes from type annotation
/home/rafal/test/tmp_folder/2589347.py:4:78: UP037 Remove quotes from type annotation
Found 2 errors.
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/astral-sh/ruff/issues/new?title=%5BAutofix%20error%5D
...quoting the contents of `/home/rafal/test/tmp_folder/2589347.py`, the rule codes UP037, along with the `pyproject.toml` settings and executed command, we'd be very appreciative!
python_compressed.zip
Ruff 0.0.287 (latest changes from main branch)
file content(at least simple cpython script shows that this is valid python file):
error
python_compressed.zip