-
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.
Respect natural ordering for imports (#1374)
- Loading branch information
1 parent
9bb470c
commit ec80d1c
Showing
6 changed files
with
112 additions
and
40 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import numpy1 | ||
import numpy10 | ||
import numpy2 | ||
from numpy import ( | ||
cos, | ||
int8, | ||
sin, | ||
int32, | ||
int64, | ||
tan, | ||
uint8, | ||
uint16, | ||
int16, | ||
uint32, | ||
uint64, | ||
) |
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
20 changes: 20 additions & 0 deletions
20
src/isort/snapshots/ruff__isort__tests__natural_order.py.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,20 @@ | ||
--- | ||
source: src/isort/mod.rs | ||
expression: checks | ||
--- | ||
- kind: UnsortedImports | ||
location: | ||
row: 1 | ||
column: 0 | ||
end_location: | ||
row: 17 | ||
column: 0 | ||
fix: | ||
content: "import numpy1\nimport numpy2\nimport numpy10\nfrom numpy import (\n cos,\n int8,\n int16,\n int32,\n int64,\n sin,\n tan,\n uint8,\n uint16,\n uint32,\n uint64,\n)\n" | ||
location: | ||
row: 1 | ||
column: 0 | ||
end_location: | ||
row: 17 | ||
column: 0 | ||
|
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