-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
87 lines (79 loc) · 2.13 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
ci:
skip: [flake8]
repos:
# Formatters
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.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]
# Notebook tools
# - repo: https://github.com/kynan/nbstripout
# rev: 0.7.1
# hooks:
# - id: nbstripout
# args: [--drop-empty-cells]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.3
hooks:
- id: ruff
name: "ruff sort imports 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
# Linters
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
exclude: ^docs
additional_dependencies: [types-all]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.4
hooks:
- id: ruff
name: "ruff sort imports"
args:
- "--fix"
- "--select=I"
- "-v"
alias: isort
- id: ruff-format
# Commands above are both formatters an not linters
# See also: https://github.com/astral-sh/ruff/discussions/7310#discussioncomment-7102010
- id: ruff
name: "ruff lint"
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
types: [file]
types_or: [python, pyi, markdown, rst, jupyter]
args: ["--ignore-words-list=doas"]
- repo: https://github.com/rhysd/actionlint
rev: "v1.6.27"
hooks:
- id: actionlint