-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
executable file
·42 lines (38 loc) · 1.12 KB
/
.pre-commit-config.yaml
File metadata and controls
executable file
·42 lines (38 loc) · 1.12 KB
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
default_stages: [pre-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# Format yaml files
- id: check-yaml
# Ignore conda build meta.yaml files
exclude: ^scripts/conda-build/meta.*\.yaml$
# Fix end-of-file issues
- id: end-of-file-fixer
# Fix trailing whitespace
- id: trailing-whitespace
# Prevent debug statements
- id: debug-statements
- id: fix-encoding-pragma
- id: mixed-line-ending
# Code formatting
- repo: https://github.com/ambv/black
rev: 25.1.0
hooks:
- id: black
# Further linting (e.g. module imported but not used)
- repo: https://github.com/PyCQA/flake8
rev: 7.3.0
hooks:
- id: flake8
args: ["--max-line-length=88"]
# Remove metadata from jupyter notebooks. This will always be triggered when you commit a change in a notebook.
- repo: local
hooks:
- id: nbstripout
name: nbstripout with keep-output
entry: |
python -m nbstripout --keep-output $@
language: system
files: \.ipynb$
exclude: tests/