forked from valhalla/valhalla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
33 lines (31 loc) · 901 Bytes
/
.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
repos:
# C++
- repo: local
hooks:
- id: format
name: format
entry: bash ./scripts/format.sh
language: system
pass_filenames: false
# Python formatter
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
language_version: python3
args: ['--line-length=105', '--skip-string-normalization']
files: ^(src/bindings/python/|scripts/)
# Python linter
- repo: https://gitlab.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
# E501: ignore line length (black auto-formats)
# E731: ignore replace-lambda-with-def warnings
# E203: ignore "whitespace before ':'"
args: [
'--max-line-length=105',
'--extend-ignore=E501,E731,E203',
'--extend-exclude=src/bindings/python/__init__.py'
]
files: ^(src/bindings/python/|scripts/)