-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consider Jupyter index for code frames (
--show-source
) (#5402)
## Summary Consider Jupyter index for code frames (`--show-source`). This solves two problems as mentioned in the linked issue: > Omit any contents from adjoining cells If the Jupyter index is present, we'll use that to check if the surrounding lines belong to the same cell as the content line. If not, we'll skip that line until we either reach the one which does or we reach the content line. > code frame line number If the Jupyter index is present, we'll use that to get the actual start line in corresponding to the computed start index. ## Test Plan `cargo run --bin ruff -- check --no-cache --isolated --select=ALL --show-source /path/to/notebook.ipynb` fixes: #5395
- Loading branch information
1 parent
d19324d
commit 2aecaf5
Showing
2 changed files
with
60 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters