From 73491bdf26955924b3bff0ea192af4c4c38009d8 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Tue, 5 Aug 2025 10:19:01 +0200 Subject: [PATCH] add codespell pre-commit hook --- .cursor/rules/test-running.mdc | 2 +- .pre-commit-config.yaml | 6 ++++++ CHANGELOG.md | 13 +++++++------ testing/test_version.py | 4 ++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.cursor/rules/test-running.mdc b/.cursor/rules/test-running.mdc index 0bd595a2..201f9af6 100644 --- a/.cursor/rules/test-running.mdc +++ b/.cursor/rules/test-running.mdc @@ -1,5 +1,5 @@ --- -description: run tests wit uv tooling +description: run tests with uv tooling globs: alwaysApply: true --- diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ae795145..7c3dfd0b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,3 +31,9 @@ repos: rev: 2025.05.02 hooks: - id: sp-repo-review + +- repo: https://github.com/codespell-project/codespell + rev: v2.3.0 + hooks: + - id: codespell + args: [-w, --ignore-words-list=hist,nd,te] diff --git a/CHANGELOG.md b/CHANGELOG.md index ed1f30c6..9ec68c2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,14 +6,15 @@ ### Fixed - fix #1180: ensure version dumping works when no scm_version is given (problems in downstreams) -- fix #1181: config - reintroduce controll over when we expect a section to be present - as it turns out theres valid use cases where setuptools_scm is not direct part of the dependencies +- fix #1181: config - reintroduce control over when we expect a section to be present + as it turns out there's valid use cases where setuptools_scm is not direct part of the dependencies +- add codespell pre-commit hook ## v9.0.0 ### Breaking -- fix #1019: pass python version build tags from scm version to results propperly +- fix #1019: pass python version build tags from scm version to results properly ### Added @@ -38,7 +39,7 @@ - fix #1150: enable setuptools-scm when we are a build requirement - feature #1154: add the commit id the the default version file template - drop scriv -- fix #921: document setuptools version requirements more consistently - 61 as minumum asn 8 as recommended minimum +- fix #921: document setuptools version requirements more consistently - 61 as minimum asn 8 as recommended minimum ### Fixed @@ -51,7 +52,7 @@ - fix #879: add test that validates case different behavior on windows - migrate git describe command to new scm config - add support for failing on missing submodules -- fix #279: expand errors when scm can be found upwards and relative_to wasnt used +- fix #279: expand errors when scm can be found upwards and relative_to wasn't used - fix #577: introduce explicit scmversion node and short node - fix #1100: add workaround for readthedocs worktress to the docs - fix #790: document shallow fail for rtd @@ -72,7 +73,7 @@ ### Fixed -- fixed #1131: allow self-build without importlib_metadata avaliable on python3.9 +- fixed #1131: allow self-build without importlib_metadata available on python3.9 ## v8.3.0 diff --git a/testing/test_version.py b/testing/test_version.py index 71850074..e63c9493 100644 --- a/testing/test_version.py +++ b/testing/test_version.py @@ -514,13 +514,13 @@ def local(self) -> str | None: def test_no_matching_entrypoints(config_key: str) -> None: version = meta( "1.0", - config=replace(c, **{config_key: "nonexistant"}), # type: ignore[arg-type] + config=replace(c, **{config_key: "nonexistent"}), # type: ignore[arg-type] ) with pytest.raises( ValueError, match=( r'Couldn\'t find any implementations for entrypoint "setuptools_scm\..*?"' - ' with value "nonexistant"' + ' with value "nonexistent"' ), ): format_version(version)