Open beskep opened 4 hours ago
Thanks so much for this!
This can be reproduced with a notebook that just consists of three empty cells. We are somehow counting empty cells as newlines and then erroring when we try to "delete" them.
Actually this bug has a wider blast radius.
If you make a notebook with three cells like this:
a = [1]
a.append(2)
# new cell
a.append(3)
# new cell
a.append(4)
and apply the unsafe fix for FURB118
you also get a panic.
I'm guessing that cell deletion is creating a problem when update_cell_offsets
and update_cell_contents
are being called.
command:
ruff check .\src\test.ipynb --fix --diff
(No panic when--isolated
included)ruff version: 0.7.4
pyproject.toml
[tool.ruff] preview = true
[tool.ruff.lint] select = ["W"]