Skip to content

Commit f05d59e

Browse files
committed
Optionally integrate codespell into the repo
1 parent 506ff91 commit f05d59e

File tree

4 files changed

+767
-730
lines changed

4 files changed

+767
-730
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ jobs:
4848
uv run --no-project ruff check --output-format=github python/
4949
uv run --no-project ruff format --check python/
5050
51+
- name: Run codespell
52+
run: |
53+
uv run --no-project codespell --toml pyproject.toml
54+
5155
generate-license:
5256
runs-on: ubuntu-latest
5357
steps:

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,13 @@ repos:
4545
types: [file, rust]
4646
language: system
4747

48+
- repo: https://github.com/codespell-project/codespell
49+
rev: v2.4.1
50+
hooks:
51+
- id: codespell
52+
args: [ --toml, "pyproject.toml"]
53+
additional_dependencies:
54+
- tomli
55+
4856
default_language_version:
4957
python: python3

pyproject.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,18 @@ max-doc-length = 88
129129
"benchmarks/*" = ["D", "F", "T", "BLE", "FURB", "PLR", "E", "TD", "TRY", "S", "SIM", "EXE", "UP"]
130130
"docs/*" = ["D"]
131131

132+
[tool.codespell]
133+
skip = [
134+
"./target",
135+
"uv.lock",
136+
"./python/tests/test_functions.py"
137+
]
138+
count = true
139+
ignore-words-list = [
140+
"ans",
141+
"IST"
142+
]
143+
132144
[dependency-groups]
133145
dev = [
134146
"maturin>=1.8.1",
@@ -138,6 +150,7 @@ dev = [
138150
"ruff>=0.9.1",
139151
"toml>=0.10.2",
140152
"pygithub==2.5.0",
153+
"codespell==2.4.1",
141154
]
142155
docs = [
143156
"sphinx>=7.1.2",

0 commit comments

Comments
 (0)