Skip to content

Commit 7bbf500

Browse files
author
Drew Yang
committed
feat: ✨ add more pre-commit hooks
1 parent d85c665 commit 7bbf500

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.pre-commit-config.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ repos:
1111
rev: v5.0.0
1212
hooks:
1313
- id: check-yaml
14+
exclude: 'docs/mkdocs.yaml' # exclude mkdocs.yaml since pymdownx.emoji !! usage
1415
- id: check-json
16+
exclude: '(.vscode|.devcontainer)' # exclude these since // was used for comments
1517
- id: check-toml
1618
- id: trailing-whitespace
1719
- id: end-of-file-fixer
@@ -20,23 +22,26 @@ repos:
2022
rev: v2.4.1
2123
hooks:
2224
- id: codespell
25+
- repo: https://github.com/pycqa/isort
26+
rev: 5.12.0 # Use the latest stable version
27+
hooks:
28+
- id: isort
29+
args:
30+
- --profile=black # Optional, makes isort compatible with Black
2331
- repo: https://github.com/psf/black
24-
rev: 24.2.0
32+
rev: 24.2.0 # matching versions in pyproject.toml and github actions
2533
hooks:
2634
- id: black
27-
args:
28-
- --required-version='24.2.0'
29-
- -check
30-
- -v=datajoint,tests
31-
- --diff
35+
args: ["--check", "-v", "datajoint", "tests", "--diff"] # --required-version is conflicting with pre-commit
3236
- repo: https://github.com/PyCQA/flake8
3337
rev: 7.1.2
3438
hooks:
3539
- id: flake8
3640
args:
37-
- --ignore=E203,E722,W503 datajoint
41+
- --ignore=E203,E722,W503
3842
- --count
3943
- --max-complexity=62
4044
- --max-line-length=127
4145
- --statistics
42-
- --per-file-ignores='datajoint/diagram.py:C901'
46+
- --per-file-ignores=datajoint/diagram.py:C901
47+
files: datajoint # a lot of files in tests are not compliant

0 commit comments

Comments
 (0)