-
Notifications
You must be signed in to change notification settings - Fork 7
/
.pre-commit-config.yaml
74 lines (66 loc) · 1.7 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
default_install_hook_types:
- pre-push
default_language_version:
python: python3.11
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
# - id: trailing-whitespace
# args: [--markdown-linebreak-ext=md]
# - id: end-of-file-fixer
- id: mixed-line-ending
- id: check-yaml
- id: sort-simple-yaml
- id: check-added-large-files
# - repo: https://github.com/psf/black
# rev: 24.8.0
# hooks:
# - id: black
# args:
# - --config=pyproject.toml
# - repo: https://github.com/pycqa/isort
# rev: 5.13.2
# hooks:
# - id: isort
# name: isort (python)
# args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.0
hooks:
# Run the linter.
- id: ruff
args: ["--fix"]
# Run the formatter.
# - id: ruff-format
- repo: local
hooks:
- id: pytest
name: pytest
entry: pytest
language: system
#language: script
pass_filenames: false
# alternatively you could `types: [python]` so it only runs when python files change
# though tests might be invalidated if you were to say change a data file
always_run: true
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
hooks:
- id: mypy
files: src
args:
- "--ignore-missing-imports" # Not managing to get it to work from pre-commit without this flag
- "--namespace-packages"
- "--explicit-package-bases"
- "--install-types"
- "--non-interactive"
- repo: local
hooks:
- id: nocommit
name: NOCOMMIT check
entry: NOCOMMIT
language: pygrep
exclude: .pre-commit-config.yaml
types: [text]