Skip to content

Commit f9af6e8

Browse files
committed
pre-commit: add codespell
Signed-off-by: Benjamin Gilbert <[email protected]>
1 parent 3ac147e commit f9af6e8

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ repos:
6767
name: Validate reStructuredText syntax
6868
additional_dependencies: [sphinx, toml]
6969

70+
- repo: https://github.com/codespell-project/codespell
71+
rev: v2.4.1
72+
hooks:
73+
- id: codespell
74+
name: Check spelling with codespell
75+
additional_dependencies:
76+
- tomli # Python < 3.11
77+
7078
- repo: meta
7179
hooks:
7280
- id: check-hooks-apply

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ openslide = ["py.typed", "*.pyi"]
5151
skip-string-normalization = true
5252
target-version = ["py38", "py39", "py310", "py311", "py312", "py313"]
5353

54+
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
55+
[tool.codespell]
56+
check-hidden = true
57+
# ignore-regex = ""
58+
# ignore-words-list = ""
59+
5460
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
5561
# also ignore:
5662
# - E741 ambiguous variable name

0 commit comments

Comments
 (0)