-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
90 lines (81 loc) · 2.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# How to use this:
# 1) Install https://pre-commit.com/ `pip install --user pre-commit`
# 2) Execute `pre-commit install` inside the checkout root
# 2a) Optional: run `pre-commit run` to test if everything works.
# 3) Every commit now goes through linting, mypy, etc.
# 4) If you ever need to commit without passing checks, run `git commit --no-verify`
#
# Note: The first run will be very slow since pre-commit generates virtualenvs for the
# various hooks.
# Additionally the pylint and mypy hooks need to install all Raiden dependencies into their
# virtualenvs on first run. See tools/pre-commit/pre-commit-wrapper.py for details.
default_language_version:
python: python3.9
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: debug-statements
exclude: '^(raiden/ui/cli.py)|(conftest.py)$'
- id: detect-private-key
- id: end-of-file-fixer
exclude: .bumpversion_client.cfg
- id: fix-encoding-pragma
args: ['--remove']
- id: mixed-line-ending
- id: no-commit-to-branch
args: ['--branch', 'master', '--branch', 'develop']
- id: trailing-whitespace
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.8.0
hooks:
- id: python-no-eval
- id: python-no-log-warn
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: git://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
args: ["--ignore-whitespace", "--settings-path", "./"]
- repo: https://github.com/python/black
rev: 22.3.0
hooks:
- id: black
- repo: https://gitlab.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
args: ["--config=setup.cfg"]
additional_dependencies:
- "flake8-bugbear==21.9.2"
- "flake8-tuple==0.4.1"
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.982
hooks:
- id: mypy
entry: tools/pre-commit/pre-commit-wrapper.py mypy
additional_dependencies: ["pip-tools==6.8.0"]
- repo: https://github.com/PyCQA/pylint
rev: v2.11.1
hooks:
- id: pylint
entry: tools/pre-commit/pre-commit-wrapper.py pylint
additional_dependencies: ["pip-tools==6.8.0"]
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.5
hooks:
- id: shellcheck