-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
87 lines (76 loc) · 2.63 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
ci:
autoupdate_schedule: monthly
default_language_version:
# Keep in-sync with .python-version
python: python3.9
repos:
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
language_version: python3
args: [--config=./pyproject.toml]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
language_version: python3
args: [--config=./pyproject.toml]
- repo: https://github.com/econchick/interrogate
rev: 1.5.0
hooks:
- id: interrogate
language_version: python3.9
args: [-cpyproject.toml, sanic_beskar, tests]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args: [-w, -L, alog]
additional_dependencies:
- tomli
- repo: local
hooks:
- id: mypy
name: mypy
# or `entry: poetry run mypy`, but perhaps both are the same
entry: poetry run mypy
require_serial: true
# From the docs it is not clear the difference between `language: python` VS `language: system`
language: system
types: [ python ]
- repo: https://github.com/PyCQA/bandit
rev: '1.7.8'
hooks:
- id: bandit
name: bandit
description: 'Bandit is a tool for finding common security issues in Python code'
entry: bandit
language: python
language_version: python3
types: [python]
require_serial: true
args: ['--configfile=./pyproject.toml']
additional_dependencies: [".[toml]"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files # prevents giant files from being committed.
- id: check-case-conflict # checks for files that would conflict in case-insensitive filesystems.
- id: check-merge-conflict # checks for files that contain merge conflict strings.
- id: check-yaml # checks yaml files for parseable syntax.
- id: detect-private-key # detects the presence of private keys.
- id: end-of-file-fixer # ensures that a file is either empty, or ends with one newline.
- id: fix-byte-order-marker # removes utf-8 byte order marker.
- id: mixed-line-ending # replaces or checks mixed line ending.
- id: trailing-whitespace # trims trailing whitespace.
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.28.0
hooks:
- id: check-github-actions
- id: check-github-workflows