-
Notifications
You must be signed in to change notification settings - Fork 4
/
.pre-commit-config.yaml
52 lines (52 loc) · 1.61 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
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 py39 -e lint
language: system
always_run: true
require_serial: true
pass_filenames: false
# insert-license
- id: insert-license
name: insert-license
entry: >-
pixi run -e lint
insert-license
--license-base64 Q29weXJpZ2h0IChjKSBRdWFudENvIDIwMjMtMjAyNApTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQlNELTMtQ2xhdXNlCg==
--dynamic-years
--comment-style "#"
language: system
types: [python]
# ruff
- id: ruff
name: ruff
entry: pixi run -e lint ruff check --fix --exit-non-zero-on-fix --force-exclude --target-version py39
language: system
types_or: [python, pyi]
require_serial: true
- id: ruff-format
name: ruff-format
entry: pixi run -e lint ruff format --force-exclude --target-version py39
language: system
types_or: [python, pyi]
require_serial: true
# mypy
- id: mypy
name: mypy
entry: pixi run -e default mypy
language: system
types: [python]
require_serial: true
exclude: ^(tests|api-coverage-tests)/
# prettier
- id: prettier
name: prettier
entry: pixi run -e lint prettier --write --list-different --ignore-unknown
language: system
types: [text]
files: \.(md|yml|yaml)$