-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
100 lines (99 loc) · 3.4 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
100 lines (99 loc) · 3.4 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
default_language_version:
python: python3
exclude: 'dotnet'
ci:
autofix_prs: true
autoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions'
autoupdate_schedule: 'monthly'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-yaml
args: ["--unsafe"]
- id: check-toml
- id: check-json
- id: check-byte-order-marker
exclude: .gitignore
- id: check-merge-conflict
- id: detect-private-key
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.15
hooks:
- id: ruff
types_or: [ python, pyi, jupyter ]
args: ["--fix", "--ignore=E402"]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args: ["-L", "ans,linar,nam,tread,ot,"]
exclude: |
(?x)^(
pyproject.toml |
website/static/img/ag.svg |
website/yarn.lock |
website/docs/tutorial/code-executors.ipynb |
website/docs/topics/code-execution/custom-executor.ipynb |
website/docs/topics/non-openai-models/cloud-gemini.ipynb |
notebook/.*
)$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.20.2
hooks:
- id: mypy
additional_dependencies: [pydantic, types-PyYAML, types-requests, types-setuptools, PySide6]
args: ["--ignore-missing-imports"]
- repo: local
hooks:
- id: okf-no-legacy-concepts
name: OKF-CIS — no legacy CONCEPT ids
entry: python3 /home/apps/workspace/agent-packages/agent-utilities/scripts/check_no_legacy_markers.py .
language: system
pass_filenames: false
always_run: true
- id: check-stubs
name: Check for Active Stubs and TODOs
entry: python3 /home/apps/workspace/agent-packages/agent-utilities/scripts/check_stubs.py
language: system
types: [python]
- id: check-sprawl
name: Guardrail — anti-sprawl
entry: python3 /home/apps/workspace/agent-packages/agent-utilities/scripts/check_sprawl.py
language: system
args: ["."]
pass_filenames: false
always_run: true
- id: check-coupling
name: Guardrail — geniusbot coupling (adapter seam)
entry: python3 /home/apps/workspace/agent-packages/agent-utilities/scripts/check_coupling.py
language: system
pass_filenames: false
always_run: true
- id: pytest
name: pytest
entry: bash -c 'export QT_QPA_PLATFORM=offscreen; test_target="tests"; for d in tests/unit test/unit tests test; do if [ -d "$d" ]; then test_target="$d"; break; fi; done; if [ -f uv.lock ]; then uv run --all-extras pytest "$test_target" -q --tb=short -m "not slow and not integration" --timeout=60; else pytest "$test_target" -q --tb=short -m "not slow and not integration" --timeout=60; fi'
language: system
types: [python]
pass_filenames: false
always_run: true
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.5
hooks:
- id: nbqa-black
- repo: local
hooks:
- id: security-sanitizer
name: Security and Garbage Sanitizer
entry: python scripts/security_sanitizer.py
language: python
pass_filenames: false
always_run: true