Skip to content

Commit 61acb54

Browse files
committed
👷 Add pre-commit hook to catch typos
1 parent 45e6f47 commit 61acb54

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ repos:
1111
- --unsafe
1212
- id: end-of-file-fixer
1313
- id: trailing-whitespace
14+
- repo: https://github.com/crate-ci/typos
15+
rev: bbaefadf97b0ec5fdc942684b647f1a6ab250274 # v1.46.0
16+
hooks:
17+
- id: typos
18+
args: [--force-exclude]
1419
- repo: local
1520
hooks:
1621
- id: local-ruff-check

pyproject.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,16 @@ keep-runtime-typing = true
161161

162162
[tool.ty.terminal]
163163
error-on-warning = true
164+
165+
[tool.typos.files]
166+
extend-exclude = [
167+
"coverage/",
168+
"dist/",
169+
"docs/img/",
170+
"release-notes.md",
171+
"htmlcov/",
172+
"uv.lock",
173+
]
174+
175+
[tool.typos.default.extend-identifiers]
176+
alls = "alls"

0 commit comments

Comments
 (0)