Skip to content

Commit

Permalink
feat: add isort to pre-commit (closes #61)
Browse files Browse the repository at this point in the history
This is so we don't have to manually take care of import sorting
  • Loading branch information
beuss-git committed Mar 7, 2023
1 parent c3af6ef commit 9e61e26
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ repos:
hooks:
- id: black

- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.4.0
hooks:
- id: commitlint
stages: [commit-msg]

- repo: https://github.com/pycqa/isort
rev: 5.11.5
hooks:
- id: isort
name: isort (python)

- repo: local
hooks:
- id: pylint
Expand All @@ -34,9 +46,3 @@ repos:
language: system
types: [python]
args: [--strict, --config-file=mypy.ini]

- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.4.0
hooks:
- id: commitlint
stages: [commit-msg]
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ build-backend = "poetry.core.masonry.api"
[tool.poe.tasks]
# Thanks to https://github.com/Interpause/nicepipe/blob/937fb4b81bb6ef6d4c7bfbeaf3fe1998e63110ea/pyproject.toml#L9
torch-cuda = "pip install torch torchvision torchaudio --force-reinstall --no-deps --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cu117"

[tool.isort]
profile = "black"

0 comments on commit 9e61e26

Please sign in to comment.