-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
69 lines (62 loc) · 2.76 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
default_stages: [commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files # Prevent giant files from being committed
args: ['--maxkb=5000']
- id: check-case-conflict # Check for files with names that would conflict on a case-insensitive filesystem like MacOS HFS+ or Windows FAT.
- id: check-json # Attempts to load all json files to verify syntax
- id: check-merge-conflict # Check for files that contain merge conflict strings
- id: check-toml # Attempts to load all TOML files to verify syntax
- id: check-yaml # Attempts to load all yaml files to verify syntax
- id: detect-private-key # Checks for the existence of private keys
- id: double-quote-string-fixer # This hook replaces double-quoted strings with single quoted strings
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline
exclude: README.md
- id: pretty-format-json # Checks that all your JSON files are pretty. "Pretty" here means that keys are sorted and indented. You can configure this with the following commandline options
args: ['--autofix']
- id: trailing-whitespace # Trims trailing whitespace.
exclude: README.md
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
# Black is the uncompromising Python code formatter. By using it, you agree to cede control over minutiae of hand-formatting
- id: black
args: [ '--line-length=140', '--skip-string-normalization' ]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.267
hooks:
- id: ruff
args: ['--line-length=140']
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.1
hooks:
# Mypy is an optional static type checker for Python that aims to combine the benefits of dynamic (or "duck") typing and static typing
- id: mypy
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
args: [ '-r', 'src']
exclude: 'tests/'
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.72.2
hooks:
- id: terraform_fmt
- repo: https://github.com/python-poetry/poetry
rev: 1.6.0
hooks:
# The poetry-check hook calls the poetry check command to make sure the poetry configuration does not get committed in a broken state
- id: poetry-check
# The poetry-lock hook calls the poetry lock command to make sure the lock file is up-to-date when committing changes.
- id: poetry-lock
- repo: local
hooks:
- id: tests
name: tests
entry: poetry run pytest -s
language: python
"types": [ python ]
pass_filenames: false
stages: [ push ]