diff options
| author | Tamas Szabo <szabtam@gmail.com> | 2020-08-25 09:21:13 +0300 |
|---|---|---|
| committer | Tamas Szabo <szabtam@gmail.com> | 2020-08-25 09:21:13 +0300 |
| commit | ef5cdee0974c3403ee4e576e0f325f7746cc7553 (patch) | |
| tree | c6b08b3cb6d6178b7cc6b1bd9ad63b575e0195c4 /docs/upgrade_guides | |
| parent | 8e0ee9866c8f282786dfd94b127da69e0e13b30f (diff) | |
| download | isort-ef5cdee0974c3403ee4e576e0f325f7746cc7553.tar.gz | |
Update timothycrosley references to pycqa
Diffstat (limited to 'docs/upgrade_guides')
| -rw-r--r-- | docs/upgrade_guides/5.0.0.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/upgrade_guides/5.0.0.md b/docs/upgrade_guides/5.0.0.md index 0b17595d..6a68acec 100644 --- a/docs/upgrade_guides/5.0.0.md +++ b/docs/upgrade_guides/5.0.0.md @@ -5,8 +5,8 @@ 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://timothycrosley.github.io/isort/CHANGELOG/#500-penny-july-4-2020) -* [isort 5 release document](https://timothycrosley.github.io/isort/docs/major_releases/introducing_isort_5/) +* [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/) !!! 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://timothycrosley.github.io/isort/docs/configuration/options/#float-to-top](https://timothycrosley.github.io/isort/docs/configuration/options/#float-to-top) +See: [https://pycqa.github.io/isort/docs/configuration/options/#float-to-top](https://pycqa.github.io/isort/docs/configuration/options/#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 manor in which they are loaded on the -[config files documentation page](https://timothycrosley.github.io/isort/docs/configuration/config_files/). +[config files documentation page](https://pycqa.github.io/isort/docs/configuration/config_files/). ### `not_skip` This is the same as the `--dont-skip` CLI option above. In an earlier version isort had a default skip of `__init__.py`. To get around that many projects wanted a way to not skip `__init__.py` or any other files that were automatically skipped in the future by isort. isort no longer has any default skips, so if the value here is `__init__.py` you can simply remove the setting. If it is something else, just make sure you aren't specifying to skip that file somewhere else in your config. @@ -58,10 +58,10 @@ 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://timothycrosley.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/#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/timothycrosley/isort/issues/1147). +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). The TL;DR of which is that isort has now changed from `default_section=FIRSTPARTY` to `default_section=THIRDPARTY`. If you all already setting the default section to third party, your config is probably in good shape. If not, you can either use the old finding approach with `--magic-placement` in the CLI or `old_finders=True` in your config, or preferably, you are able to remove all placement options and isort will determine it correctly. If it doesn't, you should be able to just specify your projects modules with `known_first_party` and be done with it. @@ -77,7 +77,7 @@ If you have a step in your precommit called `seed-isort-config` or similar, it i isort now includes an optimized precommit configuration in the repo itself. To use it you can replace any existing isort precommit step with: ``` - - repo: https://github.com/timothycrosley/isort + - repo: https://github.com/pycqa/isort rev: 5.3.2 hooks: - id: isort |
