We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--show-source
Take the test case as an example where there are two cells with unsorted imports.
When run using the following command:
cargo run --bin ruff -- check --select=I001 --no-cache --isolated crates/ruff/resources/test/fixtures/jupyter/isort.ipynb --show-source
The output is a single diagnostic:
crates/ruff/resources/test/fixtures/jupyter/isort.ipynb:cell 1:1:1: I001 [*] Import block is un-sorted or un-formatted | 1 | / from pathlib import Path 2 | | import random 3 | | import math 4 | | from typing import Any 5 | | import collections 6 | | # Newline should be added here | |_^ I001 7 | def foo(): 8 | pass | = help: Organize imports Found 1 error. [*] 1 potentially fixable with the --fix option.
While there are 2 import blocks (separated by a cell boundary). The fix produces the correct number which is 2:
$ cargo run --bin ruff -- check --select=I001 --no-cache --isolated crates/ruff/resources/test/fixtures/jupyter/isort.ipynb --fix Finished dev [unoptimized + debuginfo] target(s) in 0.38s Running `target/debug/ruff check --select=I001 --no-cache --isolated crates/ruff/resources/test/fixtures/jupyter/isort.ipynb --fix` Found 2 errors (2 fixed, 0 remaining).
The text was updated successfully, but these errors were encountered:
Oh, I think I found the problem. Should be an easy fix actually :)
Sorry, something went wrong.
lint_only
dhruvmanila
Successfully merging a pull request may close this issue.
Take the test case as an example where there are two cells with unsorted imports.
When run using the following command:
cargo run --bin ruff -- check --select=I001 --no-cache --isolated crates/ruff/resources/test/fixtures/jupyter/isort.ipynb --show-source
The output is a single diagnostic:
While there are 2 import blocks (separated by a cell boundary). The fix produces the correct number which is 2:
The text was updated successfully, but these errors were encountered: