Skip to content

Commit 1a04146

Browse files
authored
Use "black" profile when running isort (commit hooks)
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
1 parent e9be586 commit 1a04146

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.pre-commit-config.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ repos:
88
- repo: https://github.com/PyCQA/isort
99
rev: 5.4.2
1010
hooks:
11-
- id: isort
11+
- id: isort
12+
args: ["--profile", "black"]
1213
language_version: python
1314

1415
- repo: https://github.com/PyCQA/flake8

0 commit comments

Comments
 (0)