-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
50 lines (46 loc) · 1.45 KB
/
.pre-commit-config.yaml
File metadata and controls
50 lines (46 loc) · 1.45 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
default_language_version:
node: 16.14.2
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-docstring-first
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
exclude_types:
- "svg"
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v21.1.2
hooks:
- id: clang-format
exclude: docs
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.3
hooks:
# Run the linter.
- id: ruff
files: "src/|tests/|examples/|.github/"
exclude: "src/spdl/io/lib/.+.pyi"
types_or: [ python, pyi ]
args: [ "--fix", "--show-files" ]
# Run the formatter.
- id: ruff-format
files: "src/|tests/|examples/|.github/"
exclude: "src/spdl/io/lib/.+.pyi"
types_or: [ python, pyi ]
# This check is set to never fail, but will print all current mypy failures. See:
# https://stackoverflow.com/a/59745587
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.16.1
hooks:
- id: mypy
files: "src/|tests/|examples/"
verbose: true
entry: bash -c
args:
# Call mypy on all files that aren't marked "pyre-unsafe", excluding 'setup.py' files.
- 'mypy $((grep -L "# pyre-unsafe" "$@" 2>/dev/null || printf "%s\n" "$@") | grep -v setup.py) || true'
- --
types_or: [python, pyi]