-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
65 lines (65 loc) · 1.62 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
65
default_install_hook_types:
- pre-commit
- pre-merge-commit
repos:
# Python formatting
- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
# Python import sorting
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args:
- "--settings-file=./pyproject.toml"
# Python style
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
args:
- "--config=./tools/flake8.cfg"
# Python typing
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.0
hooks:
- id: mypy
additional_dependencies: [types-requests]
files: |
(?x)^(
library/src/charmory/.*|
examples/src/.*|
matrix/src/.*
)$
# Notebooks
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
hooks:
- id: nbqa-mypy
additional_dependencies: [mypy, types-requests]
args: ["--ignore-missing-imports"]
files: |
(?x)^(
library/src/charmory/.*|
tutorials/notebooks/.*|
examples/notebooks/.*
)$
- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
hooks:
- id: nbstripout
# Misc
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
# JSON formatting/validation
- id: check-json
- id: pretty-format-json
args:
- "--indent=4"
exclude: ".*ipynb$"
# By default, prevents files greater than 500kb
# add arg "--maxkb=xxxx" to change the threshold
- id: check-added-large-files