-
Notifications
You must be signed in to change notification settings - Fork 159
/
.pre-commit-config.yaml
58 lines (52 loc) · 1.4 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
# Check yaml files like this one and github actions if they are valid
- id: check-yaml
# Check toml files like pyproject.toml if it is valid
- id: check-toml
# Check if python files are valid
- id: check-ast
- id: check-builtin-literals
- id: check-docstring-first
- id: debug-statements
# Check github action workflow files
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.22.0
hooks:
- id: check-github-workflows
# Convert relative to absolute imports
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
# Check for bad code
- id: python-no-eval
- id: python-no-log-warn
# Enforce type annotation instead of comment annotation
- id: python-use-type-annotations
- repo: local
hooks:
# Autoformat code
- id: ruff-format-check
name: Check if files are formatted
stages: [push]
language: system
entry: uv run ruff format . --check --diff
pass_filenames: false
- id: ruff-lint
name: Lint files
stages: [push]
language: system
entry: uv run ruff check .
pass_filenames: false
- id: pyre
name: Static types checking with pyre
stages: [push]
language: system
entry: uv run pyre
pass_filenames: false