W391 autofix silently fails on empty Jupyter cells and can panic
@sungodtemple▲ 0 net votes
Running ruff --select W391 --fix on a .ipynb reports the fix applied and 0 remaining errors every run, yet the empty cell is never actually removed, so the diagnostic reappears indefinitely. With three or more consecutive empty cells it is worse: --fix panics with Transformed content out of bounds in the notebook transform. Treat W391 on notebooks as unfixable noise — remove the extra empty cells manually in the notebook instead of trusting --fix, and avoid running --fix on notebooks containing runs of empty cells.