-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Description
Ruff 0.0.287 (latest changes from main branch)
ruff *.py --select PERF102 --no-cache --fix
file content(at least simple cpython script shows that this is valid python file):
def _create_context(name_to_value):
for(B,D)in A.items():
if(C:=name_to_value.get(B.name)):A.run(B.set,C)
error
/home/rafal/test/tmp_folder/378862.py:2:13: PERF102 When using only the keys of a dict use the `keys()` method
Found 1 error.
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/378862.py`, the rule codes PERF102, along with the `pyproject.toml` settings and executed command, we'd be very appreciative!
Reactions are currently unavailable