Skip to content

Commit

Permalink
Replace reorder-python-imports by isort due to black incompatibility
Browse files Browse the repository at this point in the history
Unfortunately black and reorder-python-imports are no longer compatible, and from the looks of it probably will not be compatible anytime soon:

asottile/reorder-python-imports#367
asottile/reorder-python-imports#366
psf/black#4175

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

Closes pytest-dev#11885
  • Loading branch information
nicoddemus committed Jan 30, 2024
1 parent 407d984 commit 899a6cf
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
@@ -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]
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 899a6cf

Please sign in to comment.