ruff/crates/ruff_notebook
Dhruv Manilawala b28556d739
Update E402 to work at cell level for notebooks (#8872)
## Summary

This PR updates the `E402` rule to work at cell level for Jupyter
notebooks. This is enabled only in preview to gather feedback.

The implementation basically resets the import boundary flag on the
semantic model when we encounter the first statement in a cell.

Another potential solution is to introduce `E403` rule that is
specifically for notebooks that works at cell level while `E402` will be
disabled for notebooks.

## Test Plan

Add a notebook with imports in multiple cells and verify that the rule
works as expected.

resolves: #8669
2023-11-29 00:32:35 +00:00
..
resources/test/fixtures/jupyter Detect and ignore Jupyter automagics (#8398) 2023-11-03 01:14:10 +00:00
src Update E402 to work at cell level for notebooks (#8872) 2023-11-29 00:32:35 +00:00
Cargo.toml Update to Rust 1.74 and use new clippy lints table (#8722) 2023-11-16 18:12:46 -05:00