-
Notifications
You must be signed in to change notification settings - Fork 96
/
.pre-commit-config.yaml
64 lines (61 loc) · 1.98 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.6.0"
hooks:
- id: check-added-large-files
args: ['--maxkb=1024']
- id: check-case-conflict
- id: check-executables-have-shebangs
# See check-json5 to support orthanc json5 files - id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
- id: debug-statements
exclude: "some_path_to_files.py"
- id: detect-private-key
- id: end-of-file-fixer
exclude: "\\.(md5|sha|sha512|svg|vtk|vtp)$|^Resources\\/[^\\/]+\\.h$|\\/ColorFiles\\/.+\\.txt$|Data\\/Input\\/.+$"
- id: forbid-new-submodules
- id: mixed-line-ending
exclude: "\\.(sha|sha512|svg|vtk|vtp)$"
- id: name-tests-test
args: ['--pytest-test-first']
- id: trailing-whitespace
exclude: "\\.(sha|sha512|svg|vtk|vtp)$"
#- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
#rev: v0.2.1
#hooks:
# Run the linter.
#- id: ruff
# args: [ --fix ]
# exclude: ^scripts/
# Run the formatter., This can conflict with black, so use black instead
#- id: ruff-format
# exclude: ^scripts/
- repo: https://github.com/psf/black
# need to keep version for black in .pre-commit-config.yaml, requirements_dev.txt, and .github/workflows/prostatid_ci.yml
rev: 24.2.0
hooks:
- id: black
# - repo: https://github.com/asottile/pyupgrade
# rev: v3.15.0
# hooks:
# - id: pyupgrade
# args: [--py310-plus]
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py310-plus]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: "0.28.4"
hooks:
- id: check-dependabot
- id: check-github-workflows