-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
71 lines (70 loc) · 2.23 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: "^.tox*|^fabfile*|^plana/settings*"
fail_fast: true
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.21.0
hooks:
- id: django-upgrade
args: [--target-version, "4.2" ]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/python-poetry/poetry
rev: 1.8.3
hooks:
- id: poetry-check
- id: poetry-lock
# - id: poetry-export
# args: ["-f", "requirements.txt", "-o", "requirements/auto-common.txt", "--without-hashes"]
- repo: local
hooks:
- id: export-common-requirements
name: Export requirements/common.txt
language: system
pass_filenames: false
entry: poetry export --without-hashes -o requirements/common.txt
files: ^(pyproject.toml|poetry.lock)$
- repo: local
hooks:
- id: export-dev-requirements
name: Export requirements/dev.txt
language: system
pass_filenames: false
entry: poetry export --without-hashes -o requirements/dev.txt --with dev
files: ^(pyproject.toml|poetry.lock)$
- repo: local
hooks:
- id: export-test-requirements
name: Export requirements/test.txt
language: system
pass_filenames: false
entry: poetry export -o requirements/test.txt --with test
files: ^(pyproject.toml|poetry.lock)$
- repo: local
hooks:
- id: export-preprod-requirements
name: Export requirements/preprod.txt
language: system
pass_filenames: false
entry: poetry export -o requirements/preprod.txt --with preprod
files: ^(pyproject.toml|poetry.lock)$
- repo: local
hooks:
- id: export-prod-requirements
name: Export requirements/prod.txt
language: system
pass_filenames: false
entry: poetry export -o requirements/prod.txt --with prod
files: ^(pyproject.toml|poetry.lock)$