-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
60 lines (53 loc) · 1.91 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
default_language_version:
python: python3.10
fail_fast: true
# We can't use local hooks since some developers use dev containers and commit outside an environment which has the
# required dependencies installed.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-json # checks JSON files for parseable syntax.
- id: check-yaml # checks yaml files for parseable syntax.
- id: end-of-file-fixer # ensures that a file is either empty, or ends with one newline.
- id: trailing-whitespace # trims trailing whitespace
- repo: https://github.com/PyCQA/autoflake
rev: v2.1.1
hooks:
- id: autoflake
args:
- "--in-place"
- "--expand-star-imports"
- "--remove-duplicate-keys"
- "--remove-unused-variables"
- "-v"
- repo: https://github.com/psf/black
# Please keep these aligned with the versions defined in the pyproject.toml [tool.hatch.envs.code-quality]
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
# Please keep these aligned with the versions defined in the pyproject.toml [tool.hatch.envs.code-quality]
rev: "v1.1.1"
hooks:
- id: mypy
args:
- "--ignore-missing-imports"
additional_dependencies:
- types-aiofiles==23.1.0.2
- "types-tabulate~=0.9.0"
- "types-requests~=2.28.11"
# - "types-Markdown~=3.4.2"
# - "types-PyYAML~=6.0.12"
# - "types-python-dateutil~=2.8.19"
# - "types-redis~=4.5.1"
- repo: https://github.com/pycqa/isort
# Please keep these aligned with the versions defined in the pyproject.toml [tool.hatch.envs.code-quality]
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/zricethezav/gitleaks
rev: v8.16.1
hooks:
- id: gitleaks