Mirror of https://github.com/roostorg/osprey
github.com/roostorg/osprey
1fail_fast: true
2
3default_language_version:
4 python: python3.11
5
6repos:
7 - repo: https://github.com/pre-commit/pre-commit-hooks
8 rev: v5.0.0
9 hooks:
10 - id: check-case-conflict
11 - id: check-merge-conflict
12 - id: debug-statements
13 - id: check-json
14 - id: check-toml
15 - id: mixed-line-ending
16 args: ["--fix=lf"]
17 exclude: .*/tests?/.*\.txt
18
19 - repo: https://github.com/astral-sh/ruff-pre-commit
20 rev: v0.12.9
21 hooks:
22 - id: ruff
23 args: ["--fix", "--exit-non-zero-on-fix"]
24 - id: ruff-format
25
26 # Python type checking - mostly from https://github.com/astral-sh/uv-pre-commit/issues/14.
27 - repo: local
28 hooks:
29 - id: mypy
30 name: mypy
31 entry: uv run mypy
32 types_or: [python, pyi]
33 language: system
34 pass_filenames: true
35 exclude: |
36 (?x)^(
37 .*/venv/.*$|
38 .*/setup\.py$|
39 .*_pb2\.py$|
40 .*_pb2\.pyi$|
41 .*_pb2_grpc\.py$|
42 .*/tests/.*|
43 .*/test_.*\.py$
44 )$
45
46 # React/TypeScript formatting for osprey_ui
47 - repo: local
48 hooks:
49 - id: prettier-osprey-ui
50 name: prettier (osprey_ui)
51 entry: npx prettier --config osprey_ui/.prettierrc --write
52 files: ^osprey_ui/
53 types_or: [javascript, jsx, ts, tsx, json, css, scss, markdown]
54 language: system
55 pass_filenames: true