-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
47 lines (44 loc) · 1.32 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
exclude: 'htmlcov|docs|.git'
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# add supported hooks https://pre-commit.com/hooks.html
- id: check-added-large-files
# args: ['--maxkb=XXXX']
- id: check-ast
- id: check-case-conflict
# - id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-toml
exclude: poetry\.lock
- id: check-yaml
- id: debug-statements
# - id: detect-aws-credentials
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: no-commit-to-branch
- id: requirements-txt-fixer
- id: trailing-whitespace
files: (^|/)a/.+\.(py|html|sh|css|js)$
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.8.4
hooks:
# Run the linter
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
# Run the formatter
- id: ruff-format
- repo: https://github.com/python-poetry/poetry
rev: 1.8.0
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-export
args: ["-f", "requirements.txt"]
# - id: poetry-export
# args: ["--with", "dev", "-o", "requirements-dev.txt"]