From c03b4d8aee01fa21cdc96dcbbe6c9ba01c4a9cb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Dur=C3=A1n?= Date: Wed, 20 Jan 2021 14:01:13 +0100 Subject: [PATCH] Update .pre-commit-config.yaml to prevent loops between isort and black (#45321) The pre-commit hook gets stuck in a file formatting loop where black and isort modify each other results. According to the isort webpage, the option --profile black has to be used to enhance compatibility. This has been run successfully in my local and has solved the loop. See: https://github.com/home-assistant/core/issues/45318 https://github.com/home-assistant/core/pull/45314 --- .pre-commit-config.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8944a69d9ed..37fcebca4ed 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,6 +43,9 @@ repos: rev: 5.5.3 hooks: - id: isort + args: + - --profile + - black - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.2.0 hooks: