Skip to content

Commit

Permalink
Set isort profile argument to "black"
Browse files Browse the repository at this point in the history
There are some corner-cases where isort and black revert each other's changes and you can't resolve your code such that they're both happy. There's a related issue in the iSort repo (cookiecutter#1518) (PyCQA/isort#1518). Appears the solution is to use the "black" profile, which can be set in setup.cfg or .pre-commit-config.yaml. This change adds the profile arg to the .pre-commit-config.yaml file
  • Loading branch information
JSv4 authored Apr 13, 2023
1 parent e37192a commit d148e79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion {{cookiecutter.project_slug}}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ repos:
rev: 5.12.0
hooks:
- id: isort

args: ["--profile", "black"]

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
Expand Down

0 comments on commit d148e79

Please sign in to comment.