-
Notifications
You must be signed in to change notification settings - Fork 163
/
.pre-commit-config.yaml
116 lines (106 loc) · 2.78 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1
hooks:
- id: mypy
additional_dependencies: [types-requests, types-PyYAML, types-tabulate]
files: daft
exclude: daft/pickle/.*\.py
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: detect-private-key
- id: trailing-whitespace
exclude: docs/source/api_docs/
- id: end-of-file-fixer
exclude: |
(?x)^(
docs/source/api_docs/|
docs/source/user_guide/fotw/data/
)$
- id: check-yaml
exclude: kubernetes-ops
- id: pretty-format-json
exclude: |
(?x)^(
tutorials/.*\.ipynb|
docs/.*\.ipynb|
docs/source/user_guide/fotw/data/
)$
args:
- --autofix
- --no-sort-keys
- '--indent= '
- id: check-added-large-files
- id: check-merge-conflict
- id: check-docstring-first
- id: check-toml
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-toml
args: [--autofix]
exclude: Cargo.lock
- id: pretty-format-yaml
args: [--autofix, --preserve-quotes]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.2
hooks:
# Run the linter.
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
# Run the formatter.
- id: ruff-format
- repo: local
hooks:
- id: fmt
name: fmt
description: Format files with cargo fmt.
entry: cargo fmt
language: system
types: [rust]
args: [--]
- id: cargo-check-default
name: cargo check (default)
description: Check the package for errors with default features.
entry: cargo check
language: system
types: [rust]
pass_filenames: false
args: [--workspace, --all-targets]
- id: cargo-check-all-features
name: cargo check (all features)
description: Check the package for errors.
entry: cargo check
language: system
types: [rust]
pass_filenames: false
args: [--workspace, --all-features, --all-targets]
- id: clippy
name: clippy
description: Lint rust sources
entry: cargo clippy
language: system
args: [--workspace, --all-features, --, -D, warnings]
types: [rust]
pass_filenames: false
- id: check-for-rustls
name: check-for-rustls
description: Lint rust sources
entry: ./tools/check_for_rustls.sh
language: system
types: [rust]
pass_filenames: false
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.19
hooks:
- id: validate-pyproject