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
Fixing yield-in-for-loop (UP028) fails in Ruff 0.9.2 when the iterable expression is an unparenthesized tuple.
$ cat up028.py def f(x): for e in x,: yield e
$ ruff --isolated check --select UP028 --unsafe-fixes --fix up028.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 `up028.py`, the rule codes UP028, along with the `pyproject.toml` settings and executed command, we'd be very appreciative!up028.py:2:5: UP028 Replace `yield` over `for` loop with `yield from` |1 | def f(x):2 | / for e in x,:3 | | yield e | |_______________^ UP028 | = help: Replace with `yield from`Found 1 error.[*] 1 fixable with the --fix option.
The text was updated successfully, but these errors were encountered:
Fixing
yield-in-for-loop
(UP028) fails in Ruff 0.9.2 when the iterable expression is an unparenthesized tuple.The text was updated successfully, but these errors were encountered: