-
Notifications
You must be signed in to change notification settings - Fork 22
/
.pre-commit-config.yaml
53 lines (48 loc) · 1.59 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
default_stages: [commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
args: ["--fix=no"]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.9.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.11
- repo: https://github.com/pycqa/flake8
rev: "6.1.0" # pick a git hash / tag to point to
hooks:
- id: flake8
# black-compatible flake-8 config
args: [
# disable layout-related rules as we use 'black' for these:
# - E501: leave line length decisions up to black
# - E127 and E128: extremely pedantic and difficult to get
# right, more a waste of time than an improvement
"--extend-ignore=E501,E128,E127,E203",
]
# Check commit message style.
# this commit-msg hooks needs to be explicitly installed with:
# pre-commit install --hook-type commit-msg
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.8.2
hooks:
- id: commitizen
stages: [commit-msg]
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]