Move codespell configuration into pyproject.toml#910
Conversation
So it is - among other tools - could be used/ran outside of pre-commit, e.g. just "codespell" or "codespell -w" to apply the fixes
|
Should we include tomli (maybe with a python version marker) in pre-commit? Also, do they allow the list to be a TOML list? |
…for consistency) did not touch prior pygrep-hooks for reindentation but ideally should also be harmonized
🤦 . added now
apparently (empirically tested) they do. Refactored |
|
Thanks! I'll have to update https://learn.scientific-python.org/development/guides/style/#spelling, which apparently does mention this, but I think it should be the recommendation now. :). (That must be a really old portion of the guide, it shows an example with setup.cfg!) |
|
Though you still can't run this locally due to it picking up folders like $ uvx codespell -w
Installed 1 package in 7ms
FIXED: ./tests/test_specifiers.py
FIXED: ./.nox/lint/lib/python3.9/site-packages/packaging/metadata.py
FIXED: ./.nox/lint/lib/python3.9/site-packages/readme_renderer/rst.py
FIXED: ./.nox/lint/lib/python3.9/site-packages/rfc3986-2.0.0.dist-info/METADATA
./.nox/lint/lib/python3.9/site-packages/pygments/unistring.py:40: Nd ==> And, 2nd
./.nox/lint/lib/python3.9/site-packages/pygments/lexers/_csound_builtins.py:54: endin ==> ending, end in
./.nox/lint/lib/python3.9/site-packages/pygments/lexers/_csound_builtins.py:1375: shiftin ==> shifting, shift in
./.nox/lint/lib/python3.9/site-packages/pygments/lexers/_csound_builtins.py:1412: soundin ==> sounding, sound in
...
./.mypy_cache/3.10/types.data.json:1: asend ==> ascend, as end
./.mypy_cache/3.10/types.data.json:1: asend ==> ascend, as end
./.mypy_cache/3.10/types.data.json:1: asend ==> ascend, as end
./.mypy_cache/3.10/types.data.json:1: asend ==> ascend, as end
./.mypy_cache/3.10/typing.data.json:1: asend ==> ascend, as end
./.mypy_cache/3.10/typing.data.json:1: asend ==> ascend, as end
./.mypy_cache/3.10/typing.data.json:1: asend ==> ascend, as end
./.mypy_cache/3.10/typing.data.json:1: asend ==> ascend, as end
./.mypy_cache/3.10/typing.data.json:1: asend ==> ascend, as end
./.mypy_cache/3.10/typing.data.json:1: asend ==> ascend, as end
./.mypy_cache/3.10/typing.data.json:1: asend ==> ascend, as end
./.mypy_cache/3.10/_typeshed/__init__.data.json:1: trU ==> through, true
./.mypy_cache/3.12/inspect.data.json:1: ND ==> AND, 2ND
./.mypy_cache/3.12/inspect.data.json:1: ND ==> AND, 2ND
./.mypy_cache/3.12/inspect.data.json:1: ND ==> AND, 2ND
./.mypy_cache/3.12/types.data.json:1: asend ==> ascend, as end
./.mypy_cache/3.12/types.data.json:1: asend ==> ascend, as end
... |
|
yeah, disabling and workaround there is analogous to pre-commit invocation |
So it is