From 1a04146bfe2d1f3d0781ba200dfc8d79bd8f56fd Mon Sep 17 00:00:00 2001 From: Leo Thomas Date: Mon, 7 Mar 2022 09:44:26 -0500 Subject: [PATCH] Use "black" profile when running isort (commit hooks) There are some incompatibilities between the standard configurations for isort and black ([ref](https://github.com/PyCQA/isort/issues/1518). To avoid issues of black and isort continuously reformatting the same file, add the `--profile black` option to isort --- .pre-commit-config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f81da5a..ee461eb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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