-
Notifications
You must be signed in to change notification settings - Fork 25
/
.pre-commit-config.yaml
47 lines (47 loc) · 1.41 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
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
# ruff
- 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: ruff-format
name: ruff-format
entry: pixi run -e lint ruff format --force-exclude
language: system
types_or: [python, pyi]
require_serial: true
# cython-lint
- id: cython-lint
name: cython-lint
entry: pixi run -e lint cython-lint --no-pycodestyle
language: system
types: [cython]
require_serial: true
- id: cython-double-quote
name: cython-double-quote
entry: pixi run -e lint double-quote-cython-strings
language: system
types: [cython]
require_serial: true
# mypy
- id: mypy
name: mypy
entry: pixi run -e default mypy
exclude: (^tests/|^src/glum_benchmarks/orig_sklearn_fork/)
language: system
types: [python]
require_serial: true