You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration/black_compatibility.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Compatibility with black is very important to the isort project and comes baked
7
7
All that's required to use isort alongside black is to set the isort profile to "black".
8
8
9
9
!!! tip
10
-
Beyond the profile, it is common to set [skip_gitignore](https://pycqa.github.io/isort/docs/configuration/options/#skip-gitignore) (which is not enabled by default for isort as it requires git to be installed) and [line_length](https://pycqa.github.io/isort/docs/configuration/options/#skip-gitignore) as it is common to deviate from black's default of 88.
10
+
Beyond the profile, it is common to set [skip_gitignore](https://pycqa.github.io/isort/docs/configuration/options.html#skip-gitignore) (which is not enabled by default for isort as it requires git to be installed) and [line_length](https://pycqa.github.io/isort/docs/configuration/options.html#line-length) as it is common to deviate from black's default of 88.
11
11
12
12
13
13
## Using a config file (such as .isort.cfg)
@@ -23,7 +23,7 @@ profile = "black"
23
23
multi_line_output = 3
24
24
```
25
25
26
-
Read More about supported [config files](https://pycqa.github.io/isort/docs/configuration/config_files/).
26
+
Read More about supported [config files](https://pycqa.github.io/isort/docs/configuration/config_files.html).
27
27
28
28
## CLI
29
29
@@ -51,7 +51,7 @@ after_success:
51
51
52
52
```
53
53
54
-
See [built-in profiles](https://pycqa.github.io/isort/docs/configuration/profiles/) for more profiles.
54
+
See [built-in profiles](https://pycqa.github.io/isort/docs/configuration/profiles.html) for more profiles.
Copy file name to clipboardExpand all lines: docs/configuration/config_files.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ src_paths=isort,test
81
81
82
82
## Custom config files
83
83
84
-
Optionally, you can also create a config file with a custom name, or directly point isort to a config file that falls lower in the priority order, by using [--settings-file](https://pycqa.github.io/isort/docs/configuration/options/#settings-path).
84
+
Optionally, you can also create a config file with a custom name, or directly point isort to a config file that falls lower in the priority order, by using [--settings-file](https://pycqa.github.io/isort/docs/configuration/options.html#settings-path).
85
85
This can be useful, for instance, if you want to have one configuration for `.py` files and another for `.pyx` - while keeping the config files at the root of your repository.
Copy file name to clipboardExpand all lines: docs/configuration/custom_sections_and_ordering.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,15 +115,15 @@ import b
115
115
from a import a # This will always appear below because it is a from import.
116
116
```
117
117
118
-
However, if you prefer to keep strict alphabetical sorting you can set [force sort within sections](https://pycqa.github.io/isort/docs/configuration/options/#force-sort-within-sections) to true. Resulting in:
118
+
However, if you prefer to keep strict alphabetical sorting you can set [force sort within sections](https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections) to true. Resulting in:
119
119
120
120
121
121
```python
122
122
from a import a # This will now appear at top because a appears in the alphabet before b
123
123
import b
124
124
```
125
125
126
-
You can even tell isort to always place from imports on top, instead of the default of placing them on bottom, using [from first](https://pycqa.github.io/isort/docs/configuration/options/#from-first).
126
+
You can even tell isort to always place from imports on top, instead of the default of placing them on bottom, using [from first](https://pycqa.github.io/isort/docs/configuration/options.html#from-first).
127
127
128
128
```python
129
129
from b import b # If from first is set to True, all from imports will be placed before non-from imports.
Copy file name to clipboardExpand all lines: docs/configuration/multi_line_output_modes.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Multi Line Output Modes
2
2
3
-
This [config option](https://pycqa.github.io/isort/docs/configuration/options/#multi-line-output) defines how from imports wrap when they extend past the line\_length
3
+
This [config option](https://pycqa.github.io/isort/docs/configuration/options.html#multi-line-output) defines how from imports wrap when they extend past the line\_length
!!! important - "If you use pre-commit remove seed-isort-config."
12
12
If you currently use pre-commit, make sure to see the pre-commit section of this document. In particular, make sure to remove any `seed-isort-config` pre-step.
@@ -19,7 +19,7 @@ for those of us who have gotten used to placing imports right above their usage
19
19
20
20
If you want to move all imports to the top, you can use the new`--float-to-top` flag in the CLI or `float_to_top=true` option in your config file.
@@ -46,7 +46,7 @@ The `-v` (previously for version now for verbose) and `-V` (previously for verbo
46
46
47
47
The first thing to keep in mind is how isort loads config options has changed in isort 5. It will no longer merge multiple config files, instead you must have 1 isort config per a project.
48
48
If you have multiple configs, they will need to be merged into 1 single one. You can see the priority order of configuration files and the manner in which they are loaded on the
!!! tip - "Config options are loaded relative to the file, not the isort instance."
52
52
isort looks for a config file based on the path of the file you request to sort. If you have your config placed outside of the project, you can use `--settings-path` to manually specify the config location instead. Full information about how config files are loaded is in the linked config files documentation page.
@@ -62,7 +62,7 @@ The option was originally added to allow working around this, and was then turne
62
62
### `known_standard_library`
63
63
isort settings no longer merge together, instead they override. The old behavior of merging together caused many hard to
64
64
track down errors, but the one place it was very convenient was for adding a few additional standard library modules.
65
-
In isort 5, you can still get this behavior by moving your extra modules from the `known_standard_library` setting to [`extra_standard_library`](https://pycqa.github.io/isort/docs/configuration/options/#extra-standard-library).
65
+
In isort 5, you can still get this behavior by moving your extra modules from the `known_standard_library` setting to [`extra_standard_library`](https://pycqa.github.io/isort/docs/configuration/options.html#extra-standard-library).
isort has completely rewritten its logic for placing modules in 5.0.0 to ensure the same behavior across environments. You can see the details of this change [here](https://github.com/pycqa/isort/issues/1147).
0 commit comments