-
Notifications
You must be signed in to change notification settings - Fork 161
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
101 lines (91 loc) · 2.79 KB
/
.pre-commit-config.yaml
File metadata and controls
101 lines (91 loc) · 2.79 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
default_stages: [pre-commit]
default_install_hook_types: [pre-commit, commit-msg]
exclude: (dimos/models/.*)|(deprecated)
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: insert-license
files: \.py$
exclude: (__init__\.py$)|(dimos/rxpy_backpressure/)
args:
# use if you want to remove licences from all files
# (for globally changing wording or something)
#- --remove-header
- --license-filepath
- assets/license_file_header.txt
- --use-current-year
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.3
hooks:
- id: ruff-format
stages: [pre-commit]
- id: ruff-check
args: [--fix, --unsafe-fixes]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-case-conflict
- id: trailing-whitespace
language: python
types: [text]
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
- id: check-json
- id: check-toml
- id: check-yaml
- id: pretty-format-json
name: format json
args: [ --autofix, --no-sort-keys ]
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 3.4.1
hooks:
- id: editorconfig-checker
alias: ec
args: [-disable-max-line-length, -disable-indentation]
# - repo: local
# hooks:
# - id: mypy
# name: Type check
# # possible to also run within the dev image
# #entry: "./bin/dev mypy"
# entry: "./bin/mypy"
# language: python
# additional_dependencies: ["mypy==1.15.0", "numpy>=1.26.4,<2.0.0"]
# types: [python]
- repo: local
hooks:
- id: uv-lock-check
name: Check uv.lock is up-to-date
entry: uv lock --check
language: system
files: ^pyproject\.toml$
pass_filenames: false
- id: lfs_check
name: LFS data
always_run: true
pass_filenames: false
entry: bin/hooks/lfs_check
language: script
- id: largefiles-check
name: Large files check
always_run: true
pass_filenames: false
entry: python bin/hooks/largefiles_check
language: python
additional_dependencies: ['tomli']
- id: doclinks
name: Doclinks
always_run: true
pass_filenames: false
entry: python -m dimos.utils.docs.doclinks docs/
language: system
files: ^docs/.*\.md$
- id: filter-commit-message
name: Filter generated signatures from commit message
entry: python bin/hooks/filter_commit_message.py
language: python
stages: [commit-msg]