Skip to content

Commit 3c1bd4f

Browse files
committed
Fix isort pre-commit hook
PyCQA/isort#1874 (comment)
1 parent 69c888a commit 3c1bd4f

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/build_and_test_and_release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
key: pip_cache
3131
- name: "Run pre-commit hooks (typechecks and the formatter)"
3232
run: |
33+
pip install -U pip
3334
pip install pre-commit
3435
# NB this uses mypy in .pre-commit-config.yaml
3536
pre-commit run --all-files

.pre-commit-config.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,15 @@ repos:
2121
- types-PyYAML
2222
exclude: "^(examples|test|docs)/"
2323

24-
- repo: https://github.com/pycqa/isort
25-
rev: 5.10.1
24+
- repo: local
2625
hooks:
2726
- id: isort
27+
name: isort
28+
entry: isort
29+
require_serial: true
30+
language: python
31+
language_version: python3
32+
types_or: [cython, pyi, python]
2833
args: ["--profile", "black", "--filter-files"]
34+
minimum_pre_commit_version: '2.9.2'
35+
additional_dependencies: ['isort==5.10.1']

0 commit comments

Comments
 (0)