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
This commit is contained in:
Manuel Durán 2021-01-20 14:01:13 +01:00 committed by GitHub
parent ef8ee38274
commit c03b4d8aee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: