-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
94 lines (87 loc) · 2.6 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
88
89
90
91
92
93
94
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# files: "^subdir/"
default_install_hook_types:
- "pre-commit"
- "pre-push"
minimum_pre_commit_version: 2.21.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
- id: fix-byte-order-marker
- id: check-json
exclude: |
(?x)^(
.devcontainer/devcontainer.json|
.vscode/extensions.json|
.vscode/settings.json
)$
- id: check-toml
- id: check-yaml
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args: ["-c=.yamllint.yml"]
- repo: https://github.com/biomejs/pre-commit
rev: "v0.5.0"
hooks:
- id: biome-check
additional_dependencies: ["@biomejs/biome@1.8.3"]
exclude: |
(?x)^(
.devcontainer/devcontainer.json|
.vscode/extensions.json|
.vscode/settings.json
)$
- repo: https://github.com/python-poetry/poetry
rev: 1.8.5
hooks:
- id: poetry-check
entry: /bin/sh -c "cd . && poetry check --no-ansi --no-interaction --no-cache"
pass_filenames: false
files: ^(.*/)?pyproject\.toml$
- id: poetry-lock
entry: /bin/sh -c "cd . && poetry lock --no-ansi --no-interaction --no-cache --no-update"
pass_filenames: false
files: ^(.*/)?(poetry\.lock|pyproject\.toml)$
- repo: local
hooks:
- id: mypy
name: mypy
description: "run mypy in the .venv of your local project"
entry: /bin/sh -c "cd . && .venv/bin/mypy --config-file pyproject.toml src tests"
language: python
types_or: [python, pyi]
require_serial: true
additional_dependencies: []
minimum_pre_commit_version: "2.9.2"
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.8.6
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
types_or: [python, pyi]
- repo: local
hooks:
- id: pytest
name: pytest
entry: /bin/sh -c "cd . && .venv/bin/pytest"
args: ["-c", "pyproject.toml"]
stages:
- "push"
language: system
pass_filenames: false
always_run: true