diff --git a/docs/configuration/black_compatibility.md b/docs/configuration/black_compatibility.md index c46552548..ed96f7ef5 100644 --- a/docs/configuration/black_compatibility.md +++ b/docs/configuration/black_compatibility.md @@ -7,7 +7,7 @@ Compatibility with black is very important to the isort project and comes baked All that's required to use isort alongside black is to set the isort profile to "black". !!! tip - 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. + 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. ## Using a config file (such as .isort.cfg) @@ -23,7 +23,7 @@ profile = "black" multi_line_output = 3 ``` -Read More about supported [config files](https://pycqa.github.io/isort/docs/configuration/config_files/). +Read More about supported [config files](https://pycqa.github.io/isort/docs/configuration/config_files.html). ## CLI @@ -51,7 +51,7 @@ after_success: ``` -See [built-in profiles](https://pycqa.github.io/isort/docs/configuration/profiles/) for more profiles. +See [built-in profiles](https://pycqa.github.io/isort/docs/configuration/profiles.html) for more profiles. ## Integration with pre-commit diff --git a/docs/configuration/config_files.md b/docs/configuration/config_files.md index 814b1ec63..8216a7aa0 100644 --- a/docs/configuration/config_files.md +++ b/docs/configuration/config_files.md @@ -81,7 +81,7 @@ src_paths=isort,test ## Custom config files -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). +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). 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. !!! tip diff --git a/docs/configuration/custom_sections_and_ordering.md b/docs/configuration/custom_sections_and_ordering.md index df145e889..8f12c5d81 100644 --- a/docs/configuration/custom_sections_and_ordering.md +++ b/docs/configuration/custom_sections_and_ordering.md @@ -115,7 +115,7 @@ import b from a import a # This will always appear below because it is a from import. ``` -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: +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: ```python @@ -123,7 +123,7 @@ from a import a # This will now appear at top because a appears in the alphabet import b ``` -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). +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). ```python from b import b # If from first is set to True, all from imports will be placed before non-from imports. diff --git a/docs/configuration/multi_line_output_modes.md b/docs/configuration/multi_line_output_modes.md index aed2897e9..ebc102e5c 100644 --- a/docs/configuration/multi_line_output_modes.md +++ b/docs/configuration/multi_line_output_modes.md @@ -1,6 +1,6 @@ # Multi Line Output Modes -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 +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 limit and has 12 possible settings: ## 0 - Grid diff --git a/docs/configuration/options.md b/docs/configuration/options.md index c605e39f8..9795e9640 100644 --- a/docs/configuration/options.md +++ b/docs/configuration/options.md @@ -5,7 +5,7 @@ isort will disagree but commit to your way of formatting. To enable this, isort how you want your imports sorted, organized, and formatted. Too busy to build your perfect isort configuration? For curated common configurations, see isort's [built-in -profiles](https://pycqa.github.io/isort/docs/configuration/profiles/). +profiles](https://pycqa.github.io/isort/docs/configuration/profiles.html). ## Python Version diff --git a/docs/upgrade_guides/5.0.0.md b/docs/upgrade_guides/5.0.0.md index ba8e8288e..743df0297 100644 --- a/docs/upgrade_guides/5.0.0.md +++ b/docs/upgrade_guides/5.0.0.md @@ -6,7 +6,7 @@ This guide is meant to help migrate projects from using isort 4.x.x unto the 5.0 Related documentation: * [isort 5.0.0 changelog](https://pycqa.github.io/isort/CHANGELOG/#500-penny-july-4-2020) -* [isort 5 release document](https://pycqa.github.io/isort/docs/major_releases/introducing_isort_5/) +* [isort 5 release document](https://pycqa.github.io/isort/docs/major_releases/introducing_isort_5.html) !!! important - "If you use pre-commit remove seed-isort-config." 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 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. -See: [https://pycqa.github.io/isort/docs/configuration/options/#float-to-top](https://pycqa.github.io/isort/docs/configuration/options/#float-to-top) +See: [https://pycqa.github.io/isort/docs/configuration/options.html#float-to-top](https://pycqa.github.io/isort/docs/configuration/options.html#float-to-top) ## Migrating CLI options @@ -46,7 +46,7 @@ The `-v` (previously for version now for verbose) and `-V` (previously for verbo 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. 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 -[config files documentation page](https://pycqa.github.io/isort/docs/configuration/config_files/). +[config files documentation page](https://pycqa.github.io/isort/docs/configuration/config_files.html). !!! tip - "Config options are loaded relative to the file, not the isort instance." 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 ### `known_standard_library` isort settings no longer merge together, instead they override. The old behavior of merging together caused many hard to track down errors, but the one place it was very convenient was for adding a few additional standard library modules. -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). +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). ### module placement changes: `known_third_party`, `known_first_party`, `default_section`, etc... 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).