-
Notifications
You must be signed in to change notification settings - Fork 7
/
.pre-commit-config.yaml
55 lines (52 loc) · 1.53 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
- id: debug-statements
- id: fix-encoding-pragma
args: [--remove]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.7
hooks:
- id: ruff
name: "ruff sort notebooks"
args:
- "--fix"
- "--select=I"
- "--config=.ruff-notebooks.toml"
alias: isort-notebooks
types_or: [jupyter]
- id: ruff-format
name: "ruff format notebooks"
types_or: [jupyter]
args:
- "--config=.ruff-notebooks.toml"
alias: format-notebooks
- id: ruff
name: "ruff lint notebooks"
types_or: [jupyter]
args:
- "--config=.ruff-notebooks.toml"
alias: check-notebooks
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
files: ".py|.rst"
args: ["--ignore-words-list=doas"]
exclude: "\\.ipynb"
# Notebook tools
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
args:
- "--drop-empty-cells"
- "--extra-keys"
- "cell.metadata.tags metadata.vscode metadata.papermill metadata.language_info.version cell.metadata.papermill"