-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
64 lines (56 loc) · 1.87 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
# Copyright (c) 2023 Mitsubishi Electric Research Laboratories (MERL)
#
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# Pre-commit configuration. See https://pre-commit.com
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=5000']
- repo: https://gitlab.com/bmares/check-json5
rev: v1.0.0
hooks:
- id: check-json5
- repo: https://github.com/homebysix/pre-commit-macadmin
rev: v1.12.3
hooks:
- id: check-git-config-email
args: ['--domains', 'merl.com']
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
args:
- --line-length=120
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--filter-files", "--line-length", "120", "--skip-gitignore"]
# Uncomment to use pyupgrade (https://github.com/asottile/pyupgrade) to automatically upgrade syntax for newer python
# - repo: https://github.com/asottile/pyupgrade
# rev: v3.3.1
# hooks:
# - id: pyupgrade
# To stop flake8 error from causing a failure, use --exit-zero. By default, pre-commit will not show the warnings,
# so use verbose: true to see them.
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
# Black compatibility, Eradicate options
args: ["--max-line-length=120", "--extend-ignore=E203",
"--eradicate-whitelist-extend", "eradicate:\\s*no",
"--exit-zero"]
verbose: true
additional_dependencies: [
# https://github.com/myint/eradicate, https://github.com/wemake-services/flake8-eradicate
"flake8-eradicate"
]