forked from hertie-dsl-interim-backup/hertie-school-deep-learning-fall-2025-tutorial-new-deep-learning-2025-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
66 lines (63 loc) · 2.13 KB
/
.pre-commit-config.yaml
File metadata and controls
66 lines (63 loc) · 2.13 KB
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
# pre-commit: A framework for managing and maintaining multi-language pre-commit hooks
# after configuration is complete, do these steps:
# pre-commit install
# pre-commit run --all-files
# to skip pre-commmit-config when git-committing in terminal, add this: "--no-verify" option.
ci:
autoupdate_commit_msg: "chore: update pre-commit hooks"
autofix_commit_msg: "style: pre-commit fixes"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
stages: [manual]
- id: check-case-conflict
stages: [manual]
- id: check-merge-conflict
stages: [manual]
- id: check-symlinks
stages: [manual]
- id: mixed-line-ending
stages: [manual]
- id: name-tests-test
stages: [manual]
args: [--pytest-test-first]
# pygrep-hooks: a collection of fast, cheap, regex based pre-commit hooks
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-no-log-warn
stages: [manual]
- id: python-no-eval
stages: [manual]
exclude: ^src/few_shot_utils/(train|evaluate)\.py$
- id: rst-directive-colons
stages: [manual]
- id: rst-inline-touching-normal
stages: [manual]
# check-manifest: This makes sense only if you have MANIFEST.in (TODO:review)
- repo: https://github.com/mgedmin/check-manifest
rev: "0.47"
hooks:
- id: check-manifest
stages: [manual]
# pip audit to check for known pip vulnerabilities, supports pyproject.toml
- repo: https://github.com/pypa/pip-audit
rev: v2.7.1
hooks:
- id: pip-audit
stages: [manual]
#Ruff linter and formatter
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.2
hooks:
# Recommended to run linter first of automatic fixes are enabled (as some linting fixes might require reformatting)
- id: ruff-format
types_or: [python, pyi, jupyter]
stages: [manual]
# Linter: optional auto-fixes
- id: ruff
args: [--fix]
types_or: [python, pyi, jupyter]
stages: [manual]