Avoid B015,B018 for last expression in a cell (#8815)

## Summary

This PR updates `B015` and `B018` to ignore last top-level expressions
in each cell of a Jupyter Notebook.

Part of #8669

## Test Plan

Add test cases for both rules and update the snapshots.
This commit is contained in:
Dhruv Manilawala 2023-11-22 09:33:23 -06:00 committed by GitHub
parent 727e389cac
commit 5b726f70f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 454 additions and 1 deletions

View file

@ -163,6 +163,7 @@ pub fn check_path(
path,
package,
source_type,
cell_offsets,
));
}
if use_imports {