Skip to content

Commit 340b543

Browse files
Add pre-commit config for codespell
1 parent 1896853 commit 340b543

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ repos:
2727
- id: rst-inline-touching-normal
2828
- id: text-unicode-replacement-char
2929

30+
- repo: https://github.com/codespell-project/codespell
31+
rev: v2.2.2
32+
hooks:
33+
- id: codespell
34+
args: ["--write-changes"]
35+
additional_dependencies:
36+
- tomli
37+
3038
- repo: https://github.com/charliermarsh/ruff-pre-commit
3139
rev: 'v0.0.170'
3240
hooks:

asdf/tags/core/ndarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def to_tree(cls, data, ctx):
436436
block = ctx.blocks.find_or_create_block_for_array(data, ctx)
437437

438438
if block.array_storage == "fits":
439-
# Views over arrays stored in FITS files have some idiosyncracies.
439+
# Views over arrays stored in FITS files have some idiosyncrasies.
440440
# astropy.io.fits always writes arrays C-contiguous with big-endian
441441
# byte order, whereas asdf preserves the "contiguousity" and byte order
442442
# of the base array.

asdf/tags/core/tests/test_external_reference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
def test_roundtrip_external_array(tmpdir):
6-
ref = ExternalArrayReference("./nonexistant.fits", 1, "np.float64", (100, 100))
6+
ref = ExternalArrayReference("./nonexistent.fits", 1, "np.float64", (100, 100))
77

88
tree = {"nothere": ref}
99

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ line-length = 120
168168
extend-exclude = ["asdf/extern/*", "docs/*"]
169169

170170
[tool.codespell]
171-
skip="*.pdf,*.fits,*.asdf,.tox,asdf/extern,build,tags,.git,docs/_build"
171+
skip="*.pdf,*.fits,*.asdf,.tox,asdf/extern,build,./tags,.git,docs/_build"
172172
ignore-words-list="""
173173
fo,
174174
"""

0 commit comments

Comments
 (0)