Skip to content

Commit 338aa61

Browse files
jensensclaude
andcommitted
Add pre-commit hooks (ruff, vale) and fix lint errors
Add .pre-commit-config.yaml with ruff, pre-commit-hooks, and Vale. Fix all prose lint errors in documentation: one sentence per line, e.g./i.e. replaced with plain English, auto-hyphen compounds joined, dashes normalized. Apply ruff auto-fixes to tests and benchmarks (import sorting, formatting, f-strings, unused variables). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fcc5b87 commit 338aa61

26 files changed

Lines changed: 688 additions & 420 deletions

.pre-commit-config.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.15.0
4+
hooks:
5+
- id: ruff
6+
args: [--fix]
7+
exclude: ^benchmarks/
8+
- id: ruff-format
9+
exclude: ^benchmarks/
10+
11+
- repo: https://github.com/pre-commit/pre-commit-hooks
12+
rev: v5.0.0
13+
hooks:
14+
- id: trailing-whitespace
15+
- id: end-of-file-fixer
16+
- id: check-yaml
17+
- id: check-added-large-files
18+
19+
- repo: https://github.com/errata-ai/vale
20+
rev: v3.9.6
21+
hooks:
22+
- id: vale
23+
name: vale sync
24+
pass_filenames: false
25+
args: [--config=docs/.vale.ini, sync]
26+
files: ^docs/sources/.*\.md$
27+
- id: vale
28+
args: [--config=docs/.vale.ini, --output=line, --minAlertLevel=error]
29+
files: ^docs/sources/.*\.md$

0 commit comments

Comments
 (0)