Skip to content

Commit

Permalink
chore: configure isort with black profile and add black precommit hook (
Browse files Browse the repository at this point in the history
#384)

* chore: configure isort with black profile and add black precommit hook

* update black version

* add advanced isort settings to match CONTRIBUTING.md
  • Loading branch information
Mustaballer authored Jul 17, 2023
1 parent 5a6f67c commit 2e7496b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ repos:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black"]
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ url = "https://github.com/explosion/spacy-models/releases/download/en_core_web_t
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.isort]
profile = "black"
group_by_package = true
from_first = true

[tool.poetry.scripts]
visualize = "openadapt.visualize:main"
record = "openadapt.record:start"
Expand Down

0 comments on commit 2e7496b

Please sign in to comment.