Replace reorder-python-imports by isort due to black incompatibility

Unfortunately black and reorder-python-imports are no longer compatible, and from the looks of it probably will not be compatible anytime soon:

https://github.com/asottile/reorder-python-imports/issues/367
https://github.com/asottile/reorder-python-imports/issues/366
https://github.com/psf/black/issues/4175

This replaces `reorder-python-imports` by `isort` configured in a way to yield roughtly the same results.

Closes #11885
This commit is contained in:
Bruno Oliveira 2024-01-29 21:54:52 -03:00
parent 407d984142
commit 899a6cf2ce
1 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black
args: [--safe, --quiet]
@ -36,11 +36,12 @@ repos:
additional_dependencies:
- flake8-typing-imports==1.12.0
- flake8-docstrings==1.5.0
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: reorder-python-imports
args: ['--application-directories=.:src', --py38-plus]
- id: isort
name: isort
args: [--force-single-line, --profile=black]
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks: