-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
55 lines (50 loc) · 1.41 KB
/
.pre-commit-config.yaml
File metadata and controls
55 lines (50 loc) · 1.41 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
51
52
53
54
55
fail_fast: true
default_language_version:
python: python3.11
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: debug-statements
- id: check-json
- id: check-toml
- id: mixed-line-ending
args: ["--fix=lf"]
exclude: .*/tests?/.*\.txt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.9
hooks:
- id: ruff
args: ["--fix", "--exit-non-zero-on-fix"]
- id: ruff-format
# Python type checking - mostly from https://github.com/astral-sh/uv-pre-commit/issues/14.
- repo: local
hooks:
- id: mypy
name: mypy
entry: uv run mypy
types_or: [python, pyi]
language: system
pass_filenames: true
exclude: |
(?x)^(
.*/venv/.*$|
.*/setup\.py$|
.*_pb2\.py$|
.*_pb2\.pyi$|
.*_pb2_grpc\.py$|
.*/tests/.*|
.*/test_.*\.py$
)$
# React/TypeScript formatting for osprey_ui
- repo: local
hooks:
- id: prettier-osprey-ui
name: prettier (osprey_ui)
entry: npx prettier --config osprey_ui/.prettierrc --write
files: ^osprey_ui/
types_or: [javascript, jsx, ts, tsx, json, css, scss, markdown]
language: system
pass_filenames: true