-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
55 lines (55 loc) · 1.74 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: local
hooks:
- id: poetry-check
name: Validate poetry config
entry: poetry check
language: python
pass_filenames: false
files: ^(.*/)?(poetry\.lock|pyproject\.toml)$
- id: poetry-install
name: Install dependencies from the poetry lock file
entry: poetry install --sync
language: python
pass_filenames: false
stages: [post-checkout, post-merge]
always_run: true
- id: format-python
name: Format Python code
language: system
types: [python]
entry: poetry run ruff format
- id: lint-python
name: Lint Python code
language: system
types: [python]
entry: poetry run ruff check
args: [--fix]
- id: check-python-type-annotations
name: Check Python Type Annotations
language: system
types: [python]
entry: env MYPYPATH=src poetry run mypy .
pass_filenames: false
- id: update-requirements
name: Update requirements.txt
language: system
files: poetry.lock
entry: poetry export --with=test --output docker/requirements.txt
pass_filenames: false
- repo: https://github.com/biomejs/pre-commit
rev: v0.6.0
hooks:
- id: biome-check
additional_dependencies: ["@biomejs/[email protected]"]