Skip to content

Commit 21f3892

Browse files
committed
chore: use typos instead of codespell
This is a Rust spell checker with the same basic idea as codespell, but it supports CamelCase / snake_case, and has a more flexible configuraiton (not perfect). I've found it catches some things codespell doesn't, and it's fast (though codespell is pretty fast too). It's got more stars on github than codespell, and has been around for a while, and seems well maintained. I haven't been actively trying it out that long, though (since the Python Bytes mention). Signed-off-by: Henry Schreiner <[email protected]>
1 parent 3803ce3 commit 21f3892

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ repos:
3030
args: []
3131
additional_dependencies: [pyparsing, nox, orjson, 'pytest<9', tomli, tomli_w, types-invoke, httpx]
3232

33-
- repo: https://github.com/codespell-project/codespell
34-
rev: "v2.4.1"
33+
- repo: https://github.com/crate-ci/typos
34+
rev: v1.40.0
3535
hooks:
36-
- id: codespell
37-
additional_dependencies:
38-
- tomli; python_version<'3.11'
36+
- id: typos
37+
args: []

pyproject.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,16 @@ dev = [{ include-group = "test" }]
5151
include = ["tests/", "docs/", "CHANGELOG.rst"]
5252
exclude = ["docs/_build", "tests/manylinux/build-hello-world.sh", "tests/musllinux/build.sh", "tests/hello-world.c", "tests/__pycache__", "build/__pycache__"]
5353

54-
[tool.codespell]
55-
ignore-words-list = [
56-
"dynamc",
57-
"notin"
58-
]
54+
[tool.typos.default.extend-identifiers]
55+
iMatix = "iMatix"
56+
ANDed = "ANDed"
57+
ORed = "ORed"
58+
59+
[tool.typos.default.extend-words]
60+
dynamc = "dynamc"
61+
notin = "notin"
62+
nd = "nd"
63+
tou = "tou"
5964

6065
[tool.coverage.run]
6166
branch = true

src/packaging/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class RawMetadata(TypedDict, total=False):
129129

130130
# Metadata 2.3 - PEP 685
131131
# No new fields were added in PEP 685, just some edge case were
132-
# tightened up to provide better interoptability.
132+
# tightened up to provide better interoperability.
133133

134134
# Metadata 2.4 - PEP 639
135135
license_expression: str

0 commit comments

Comments
 (0)