-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
65 lines (58 loc) · 1.56 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
# 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: v4.5.0
hooks:
- id: check-added-large-files
- id: check-toml
- id: check-yaml
args:
- --unsafe
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: local
hooks:
- id: isort
name: Format code with isort
language: system
entry: poetry run isort
pass_filenames: true
exclude: ^migrations/versions/
types:
- python
- id: black
name: Format code with black
language: system
entry: poetry run black
pass_filenames: true
types:
- python
- id: dotenv-linter
name: Check .env files
language: system
entry: poetry run dotenv-linter .env.example
pass_filenames: false
- id: ruff
name: Check code style with Ruff
language: system
entry: poetry run ruff check .
pass_filenames: false
exclude: ^migrations/versions/
types:
- python
- id: mypy
name: Check static types with mypy
language: system
entry: poetry run mypy .
pass_filenames: false
types_or:
- python
- pyi
- id: poetry
name: Check the validity of the pyproject.toml file
language: system
entry: poetry run poetry check
pass_filenames: false
types:
- toml