-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.pre-commit-config.yaml
63 lines (63 loc) · 1.9 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
ci:
autoupdate_commit_msg: "chore: Update pre-commit hooks"
exclude: ^(\.data/|\.scratch/)
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.1"
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix]
# TODO: enable in followup PR, causes too many changes
# - id: ruff-format
# types_or: [python, pyi, jupyter]
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
always_run: true
pass_filenames: false
args:
- .
- --config=black.toml
- --safe
- --target-version=py311
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.9.0"
hooks:
- id: mypy
pass_filenames: false
args: ["modyn"] # TODO: include other directories
additional_dependencies:
[types-setuptools, types-pyyaml, types-requests, types-psycopg2, types-PyYAML, types-protobuf]
# TODO: enable in followup PR, causes too many changes
# - repo: https://github.com/Quantco/pre-commit-mirrors-prettier
# rev: 3.2.5
# hooks:
# - id: prettier-conda
# files: "\\.(md|json|yml|yaml)$"
# - repo: https://github.com/myint/docformatter
# rev: v1.7.5
# hooks:
# - id: docformatter
- repo: https://github.com/crate-ci/typos
rev: v1.20.9
hooks:
- id: typos
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
# - id: trailing-whitespace # TODO: enable in followup PR, causes too many changes
# - id: end-of-file-fixer # TODO: enable in followup PR, causes too many changes
- id: check-merge-conflict
args: ["--assume-in-merge"]
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
always_run: true
pass_filenames: false
args: [modyn]