Skip to content

Commit

Permalink
Update .pre-commit-config.yaml to prevent loops between isort and bla…
Browse files Browse the repository at this point in the history
…ck (#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:
#45318
#45314
  • Loading branch information
mduran80 committed Jan 20, 2021
1 parent ef8ee38 commit c03b4d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Expand Up @@ -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:
Expand Down

0 comments on commit c03b4d8

Please sign in to comment.