Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
81 lines (73 loc) · 2.46 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
81 lines (73 loc) · 2.46 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
default_language_version:
python: python3
ci:
autofix_prs: true
autoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions'
autoupdate_schedule: quarterly
# The one list of files no formatter or linter touches. Vendored benchmark
# content stays byte identical to its upstream pin; saved TTTD result programs
# are published as produced; harness golden trees are byte exact render
# output. CI lints by running pre-commit over all files, so this exclude is
# the enforced boundary — the tools' pyproject sections carry no copy of it.
exclude: |
(?x)^(
recipes/(
skillclaw/harbor/(environment/workspace/|tests/grade\.py)
|tttd/examples/tttd/harbor/circle_packing_[^/]+/environment/score\.py
|tttd/examples/tttd/results/.*/best_solution\.py
|meta_harness/results/reef_harness\.py$
)
|tests/reef_service/data/harness_goldens/
)
repos:
- repo: local
hooks:
- id: python-design-policy
name: Check Python design policy (ban Protocol and TYPE_CHECKING)
entry: python .github/scripts/check_python_design.py
language: system
pass_filenames: false
- id: python-statement-policy
name: Ban assert and del in Reef source
entry: python .github/scripts/check_python_statements.py
language: system
pass_filenames: false
- id: readme-i18n
name: Check README translation pairing
entry: python .github/scripts/check_readme_i18n.py
language: system
pass_filenames: false
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: check-json
- id: check-case-conflict
- id: detect-private-key
- id: check-added-large-files
args: ['--maxkb=1000']
- id: requirements-txt-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.7
hooks:
- id: ruff-check
args: [ --fix ]
- repo: https://github.com/PyCQA/autoflake
rev: v2.0.2
hooks:
- id: autoflake
args: [--remove-all-unused-imports, --in-place]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args:
- "--profile=black" # match Black style
- "--filter-files" # skip gitignored files
additional_dependencies: []
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
name: Format code
additional_dependencies: ['click==8.0.2']