This repository was archived by the owner on May 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
66 lines (66 loc) · 2.02 KB
/
.pre-commit-config.yaml
File metadata and controls
66 lines (66 loc) · 2.02 KB
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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-json
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: no-commit-to-branch
- id: trailing-whitespace
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
args: ["-l", "100", "--target-version=py310"]
- repo: https://github.com/pycqa/flake8
rev: "5.0.4" # https://github.com/wemake-services/flake8-eradicate/issues/269
hooks:
- id: flake8 # C90,E,F,W
additional_dependencies:
- darglint==1.8.1 # DAR
- flake8-annotations==3.0.0 # ANN
- flake8-bugbear==23.3.12 # B,B9
- flake8-cognitive-complexity==0.1.0 # CCR
- flake8-comprehensions==3.11.1 # C4
- flake8-docstrings==1.7.0 # D
- flake8-eradicate==1.4.0 # E800
- flake8-pytest-style==1.7.2 # PT
- pep8-naming==0.13.3 # N8
- repo: local
hooks:
- id: poetry_lock_check
name: Check if poetry lock file is updated
entry: |
python -c "
from poetry.factory import Factory
l = Factory().create_poetry('.').locker
if l.is_locked() and l.is_fresh():
exit(0)
else:
print('run `poetry update` to fix')
exit(1)
"
language: python_venv
additional_dependencies:
- poetry
verbose: True
files: pyproject.toml
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.3.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies:
- '@commitlint/config-conventional'
- '@commitlint/ensure'
- 'commitlint-plugin-function-rules'