-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
71 lines (71 loc) · 1.67 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
exclude: .*\.svg$
- id: trailing-whitespace
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-yaml
args: [--autofix]
- id: pretty-format-toml
args: [--autofix, --trailing-commas]
exclude: Cargo.lock
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.1
hooks:
- id: ruff
args: [--fix]
types_or: [python, pyi, jupyter]
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.391
hooks:
- id: pyright
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: cargo-check
- id: clippy
- repo: local
hooks:
- id: fmt
name: fmt
description: Format files with cargo fmt
entry: cargo +nightly fmt --
language: system
types: [rust]
args: []
- id: nbsetup
name: nbsetup
description: Add install preamble to Jupyter Notebooks
entry: python scripts/nbsetup.py
language: python
types: [jupyter]
additional_dependencies: [nbformat]
args: []
- repo: https://github.com/flying-sheep/bibfmt
rev: v4.3.0
hooks:
- id: bibfmt
args:
- --sort-by-bibkey
- --drop=abstract
- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
args:
- --keep-output
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies:
- tomli
exclude_types: [jupyter] # GitHub action will run on Notebooks