From 43ceb0a0acaf98dd5e47dce1b1321a5f97e98c7a Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Wed, 24 Jun 2026 10:20:56 +1200 Subject: [PATCH] Add codespell to pre-commit to catch typos --- .pre-commit-config.yaml | 4 ++++ rtree/index.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 933a337a..ab79f97a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,3 +25,7 @@ repos: hooks: - id: mypy exclude: 'docs/.' + - repo: https://github.com/codespell-project/codespell + rev: v2.4.2 + hooks: + - id: codespell diff --git a/rtree/index.py b/rtree/index.py index 85ab9ea7..c7b07b48 100644 --- a/rtree/index.py +++ b/rtree/index.py @@ -1090,7 +1090,7 @@ def intersection_v(self, mins, maxs): ctypes.byref(nr), ) - # If we got the expected nuber of results then return + # If we got the expected number of results then return if nr.value == n - offn: return ids[: counts.sum()], counts # Otherwise, if our array is too small then resize