Skip to content

Commit

Permalink
Use "black" profile when running isort (commit hooks)
Browse files Browse the repository at this point in the history
There are some incompatibilities between the standard configurations for isort and black ([ref](PyCQA/isort#1518). 

To avoid issues of black and isort continuously reformatting the same file, add the `--profile black` option to isort
  • Loading branch information
leothomas committed Mar 7, 2022
1 parent e9be586 commit 1a04146
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ repos:
- repo: https://github.com/PyCQA/isort
rev: 5.4.2
hooks:
- id: isort
- id: isort
args: ["--profile", "black"]
language_version: python

- repo: https://github.com/PyCQA/flake8
Expand Down

0 comments on commit 1a04146

Please sign in to comment.