mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 04:45:01 +00:00
![]() ## Summary Given a statement like `colors = 6`, we currently treat the cell as an automagic (since `colors` is an automagic) -- i.e., we assume it's equivalent to `%colors = 6`. This PR adds some additional detection whereby if the statement is an _assignment_, we avoid treating it as such. I audited the list of automagics, and I believe this is safe for all of them. Closes https://github.com/astral-sh/ruff/issues/8526. Closes https://github.com/astral-sh/ruff/issues/9648. ## Test Plan `cargo test` |
||
---|---|---|
.. | ||
cell | ||
add_missing_cell_id.ipynb | ||
after_fix.ipynb | ||
before_fix.ipynb | ||
invalid_extension.ipynb | ||
ipy_escape_command.ipynb | ||
ipy_escape_command_expected.ipynb | ||
isort.ipynb | ||
isort_expected.ipynb | ||
no_cell_id.ipynb | ||
no_trailing_newline.ipynb | ||
not_json.ipynb | ||
R.ipynb | ||
undefined_name.ipynb | ||
unused_variable.ipynb | ||
unused_variable_expected.ipynb | ||
valid.ipynb | ||
wrong_schema.ipynb |