-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
64 lines (58 loc) · 1.62 KB
/
.pre-commit-config.yaml
File metadata and controls
64 lines (58 loc) · 1.62 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
56
57
58
59
60
61
62
63
64
repos:
# Basic file hygiene
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
args: ['--maxkb=100']
# Python formatting and linting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.3
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
# Type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
hooks:
- id: mypy
args: ['--strict','src','tests','scripts']
pass_filenames: false
additional_dependencies: []
# Import smoke test
- repo: local
hooks:
- id: import-smoke
name: Import smoke test
entry: python
args: ['-c', 'import sys; sys.path.insert(0, "src"); import typesketch']
language: system
pass_filenames: false
files: '^src/.*\.py$'
# ADR index checker
- id: adr-index
name: ADR index checker
entry: python
args: ['scripts/check_adr_index.py']
language: system
pass_filenames: false
files: '^docs/adr/.*\.md$'
# Print statement blocker
- id: check-prints
name: Check print statements
entry: python
args: ['scripts/check_prints.py']
language: system
pass_filenames: false
files: '\.py$'
# Fast tests on push
- id: fast-tests
name: Fast tests (pre-push)
entry: bash
args: ['scripts/fast_tests.sh']
language: system
pass_filenames: false
stages: [pre-push]