-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make isort's detect-same-package behavior configurable
- Loading branch information
1 parent
4889b84
commit 91eabcb
Showing
11 changed files
with
123 additions
and
2 deletions.
There are no files selected for viewing
Empty file.
3 changes: 3 additions & 0 deletions
3
crates/ruff/resources/test/fixtures/isort/detect_same_package/foo/bar.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import os | ||
import pandas | ||
import foo.baz |
2 changes: 2 additions & 0 deletions
2
crates/ruff/resources/test/fixtures/isort/detect_same_package/pyproject.toml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[tool.ruff] | ||
line-length = 88 |
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
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
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
19 changes: 19 additions & 0 deletions
19
crates/ruff/src/rules/isort/snapshots/ruff__rules__isort__tests__detect_same_package.snap
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
source: crates/ruff/src/rules/isort/mod.rs | ||
--- | ||
bar.py:1:1: I001 [*] Import block is un-sorted or un-formatted | ||
| | ||
1 | / import os | ||
2 | | import pandas | ||
3 | | import foo.baz | ||
| | ||
= help: Organize imports | ||
|
||
ℹ Fix | ||
1 1 | import os | ||
2 |+ | ||
2 3 | import pandas | ||
4 |+ | ||
3 5 | import foo.baz | ||
|
||
|
19 changes: 19 additions & 0 deletions
19
crates/ruff/src/rules/isort/snapshots/ruff__rules__isort__tests__no_detect_same_package.snap
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
source: crates/ruff/src/rules/isort/mod.rs | ||
--- | ||
bar.py:1:1: I001 [*] Import block is un-sorted or un-formatted | ||
| | ||
1 | / import os | ||
2 | | import pandas | ||
3 | | import foo.baz | ||
| | ||
= help: Organize imports | ||
|
||
ℹ Fix | ||
1 1 | import os | ||
2 |-import pandas | ||
2 |+ | ||
3 3 | import foo.baz | ||
4 |+import pandas | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.