-
Notifications
You must be signed in to change notification settings - Fork 4
/
.pre-commit-config.yaml
81 lines (81 loc) · 2.51 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
exclude: ^\.pixi
repos:
- repo: local
hooks:
# ensure pixi environments are up to date
# workaround for https://github.com/prefix-dev/pixi/issues/1482
- id: pixi-install
name: pixi-install
entry: pixi install -e default -e lint
language: system
always_run: true
require_serial: true
pass_filenames: false
- id: insert-license
name: insert-license
entry: pixi run -e lint insert-license
types: [python]
language: system
args:
- --license-base64
- Q29weXJpZ2h0IChjKSBRdWFudENvIDIwMjQtMjAyNApTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQlNELTMtQ2xhdXNl
- --dynamic-years
- --comment-style
- "#"
- id: docformatter
name: docformatter
entry: pixi run -e lint docformatter
args: [-i]
types: [python]
language: system
- id: ruff
name: ruff
entry: pixi run -e lint ruff check --fix --exit-non-zero-on-fix --force-exclude
language: system
types_or: [python, pyi]
require_serial: true
- id: black-conda
name: black-conda
entry: pixi run -e lint black
language: system
require_serial: true
types: [python]
- id: mypy
name: mypy
entry: pixi run -e default mypy
language: system
types: [python]
args: ["--ignore-missing-imports", "--scripts-are-modules"]
require_serial: true
- id: prettier
name: prettier
entry: pixi run -e lint prettier
language: system
files: \.(md|yml|yaml)$
types: [text]
args: ["--write", "--list-different", "--ignore-unknown"]
- id: trailing-whitespace
name: trim trailing whitespace
language: system
entry: pixi run -e lint trailing-whitespace-fixer
types: [text]
stages: [pre-commit, pre-push, manual]
- id: end-of-file-fixer
name: fix end of files
language: system
entry: pixi run -e lint end-of-file-fixer
types: [text]
stages: [pre-commit, pre-push, manual]
- id: check-merge-conflict
name: check for merge conflicts
language: system
entry: pixi run -e lint check-merge-conflict
types: [text]
args: ["--assume-in-merge"]
- id: typos
name: typos
entry: pixi run -e lint typos --force-exclude
language: system
types: [text]
exclude: "\\.csv$"
require_serial: true