-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
72 lines (72 loc) · 2.16 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
71
72
default_language_version:
python: 3.11.2
default_stages:
[commit]
repos:
- repo: https://github.com/commitizen-tools/commitizen
rev: v2.42.1
hooks:
- id: commitizen
name: Check commit message matches Conventional Commits specification
stages: [commit-msg]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
name: Check no file >100 MB is being committed
args: [--maxkb=100000]
stages: [commit]
- id: trailing-whitespace
name: Check trailing whitespace
stages: [commit]
- id: end-of-file-fixer
name: Check files end in a newline and only a newline
stages: [commit]
- id: check-yaml
name: Check yaml files for parseable syntax
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
name: Format with Black as per PEP 8
args: [--config, ./pyproject.toml]
additional_dependencies:
- toml
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
name: Check docstrings as per PEP 257
args: [--config=./pyproject.toml]
additional_dependencies:
- toml
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.1
hooks:
- id: mypy
name: Check type annotations as per PEP 484 and PEP 526
args: [--config-file, ./pyproject.toml]
additional_dependencies:
- toml
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: Sort imports alphabetically, separated into sections and by type
args: [--settings-file, ./pyproject.toml]
additional_dependencies:
- toml
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
name: Check code as per PEP8 and for syntax errors
args: [--config, ./setup.cfg]
- repo: https://github.com/python-poetry/poetry
rev: 1.3.0
hooks:
- id: poetry-check
name: Check pyproject.toml
- id: poetry-lock
name: Check poetry.lock
args: [--check, --no-update]