-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
73 lines (68 loc) · 1.73 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
73
---
minimum_pre_commit_version: 3.7.0
exclude: ^(docs|tests|example-data|migrations|unit-test-data|VERSION)
repos:
# commit-msg hooks
# ----------
# Conventional Commit message checker (commitizen)
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.21.3
hooks:
- id: commitizen
stages:
- commit-msg
# pre-commit hooks
# ----------
# Standard pre-commit rules
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
args:
- --markdown-linebreak-ext=md
# Black (uncompromising) Python code formatter
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
args:
- --skip-string-normalization
- --target-version
- py312
# MyPy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
files: ^app
additional_dependencies:
- types-protobuf
- types-PyYAML
- types-python-dateutil
- types-pytz
- types-requests
# Pylint
# To check import errors we need to install every package
# used. This is often impractical on the client,
# and so we disable import errors on pre-commit and rely
# on this category of test in the CI stage. Consequently,
# pylint may pass on pre-commit but fail in CI - but at least
# the user has done 90% of the lint checks before the code
# hits the server.
- repo: https://github.com/pycqa/pylint
rev: v3.1.0
hooks:
- id: pylint
args:
- --disable=import-error
# YAML Lint
#- repo: https://github.com/adrienverge/yamllint
# rev: v1.26.3
# hooks:
# - id: yamllint