-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
69 lines (69 loc) · 2.04 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
repos:
- repo: https://github.com/commitizen-tools/commitizen
rev: 3.6.0
hooks:
- id: commitizen
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-yaml
exclude: '^tests/int/'
# Excluding these YAML files as they are CFN templates
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: forbid-submodules
- id: name-tests-test
exclude: '^tests/int/(redact|timeout).py$'
# Excluding these files as they are not test files
args: [--pytest-test-first]
- id: no-commit-to-branch
args: [--branch, stable]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/pre-commit/pygrep-hooks.git
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
exclude: '^tests/'
# Excluding test files from this check
- id: python-no-eval
- id: python-no-log-warn
- id: python-use-type-annotations
- id: text-unicode-replacement-char
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
hooks:
- id: mypy
language: system
# Need various MyPy plugins, thus using system python. Run "pdm install --dev --group lint" first
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: [--check]
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
args: [--check]
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
language: system
# Need various flake8 plugins, thus using system python. Run "pdm install --dev --group lint" first
- repo: https://github.com/aws-cloudformation/cfn-lint.git
rev: v0.79.6
hooks:
- id: cfn-lint
files: ^tests/int/.*\.yaml$
args: [--ignore-checks, W3002]