-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.pre-commit-config.yaml
57 lines (53 loc) · 1.42 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: '^$'
fail_fast: false
repos:
- repo: https://github.com/python-poetry/poetry
rev: 1.8.2
hooks:
- id: poetry-install
- id: poetry-check
- id: poetry-lock
- id: poetry-export
args:
- --without
- dev
- -f
- requirements.txt
- -o
- ./requirements/prod.txt
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.7
hooks:
# Run the linter.
- id: ruff
args: [--config, pyproject.toml, --fix]
# Run the formatter.
- id: ruff-format
args: [--config, pyproject.toml]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
- id: check-toml
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: name-tests-test
- id: pretty-format-json
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: local
hooks:
- id: pytest
name: pytest
entry: poetry run pytest -m 'not webtest' -m 'not slow' -m 'offci'
language: system
types: [python]
pass_filenames: false
always_run: false