-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.pre-commit-config.yaml
54 lines (54 loc) · 1.66 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
repos:
# This should be before any formatting hooks like isort
- repo: /~https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.6"
hooks:
- id: ruff
args: ["--fix"]
- repo: /~https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*|extern.*|streamtracer/extern)$"
- repo: /~https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: trailing-whitespace
exclude: ".*(.fits|.fts|.fit|.header|.txt)$"
- id: check-yaml
- id: debug-statements
- id: check-added-large-files
args: ["--enforce-all", "--maxkb=1054"]
- id: end-of-file-fixer
exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*|.json)$|^CITATION.rst$"
- id: mixed-line-ending
exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*)$"
- repo: /~https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: [ "--write-changes" ]
# Run mypy type validation
- repo: /~https://github.com/pre-commit/mirrors-mypy
rev: 'v1.10.0'
hooks:
- id: mypy
additional_dependencies: [types-setuptools]
# Python code formatting
- repo: /~https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
# Rust code formatting
- repo: /~https://github.com/FeryET/pre-commit-rust
rev: v1.1.0
hooks:
- id: cargo-check
- id: clippy
args: ["--allow-staged", "--fix", "--", "-A", "clippy::needless_return", "-W", "clippy::implicit_return"]
- id: fmt
ci:
autofix_prs: false
autoupdate_schedule: "quarterly"