-
Notifications
You must be signed in to change notification settings - Fork 7
/
.pre-commit-config.yaml
43 lines (39 loc) · 1.15 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
repos:
# Make sure that Jupyter notebooks under version control
# have their outputs stripped before committing
- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
files: ".ipynb"
# Run Black - the uncompromising Python code formatter
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black-jupyter
# Add some general purpose useful hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# Make sure that contained YAML files are well-formed
- id: check-yaml
# Trim trailing whitespace of all sorts
- id: trailing-whitespace
# Check validity of JSON files
- id: check-json
# Format JSON files consistently
- id: pretty-format-json
exclude_types:
- jupyter
args:
- --autofix
# Automatically format/sanitize setup.cfg
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.7.0
hooks:
- id: setup-cfg-fmt
# Validate CFF format
- repo: https://github.com/citation-file-format/cff-converter-python
rev: main
hooks:
- id: validate-cff