From 20e96a12a13198df9014e3469185034b38454a10 Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Thu, 4 Jul 2024 22:38:11 -0700 Subject: [PATCH] Add codespell pre-commit --- .pre-commit-config.yaml | 5 +++++ CHANGELOG.md | 2 +- lazy_loader/__init__.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e4f17bb..6113db8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,3 +29,8 @@ repos: - id: ruff args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"] - id: ruff-format + + - repo: https://github.com/codespell-project/codespell + rev: "193cd7d27cd571f79358af09a8fb8997e54f8fff" # frozen: v2.3.0 + hooks: + - id: codespell diff --git a/CHANGELOG.md b/CHANGELOG.md index f702572..70b9d2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -112,7 +112,7 @@ see release notes for v0.2rc0 below for details. - Update year [\#43](https://github.com/scientific-python/lazy-loader/pull/43) ([jarrodmillman](https://github.com/jarrodmillman)) - Update GH actions [\#42](https://github.com/scientific-python/lazy-loader/pull/42) ([jarrodmillman](https://github.com/jarrodmillman)) - Update pre-commit [\#41](https://github.com/scientific-python/lazy-loader/pull/41) ([jarrodmillman](https://github.com/jarrodmillman)) -- Update optional depedencies [\#40](https://github.com/scientific-python/lazy-loader/pull/40) ([jarrodmillman](https://github.com/jarrodmillman)) +- Update optional dependencies [\#40](https://github.com/scientific-python/lazy-loader/pull/40) ([jarrodmillman](https://github.com/jarrodmillman)) - Fix extension substitution to work with `\*.pyc` files [\#39](https://github.com/scientific-python/lazy-loader/pull/39) ([Czaki](https://github.com/Czaki)) - Sort returned \_\_all\_\_ [\#34](https://github.com/scientific-python/lazy-loader/pull/34) ([stefanv](https://github.com/stefanv)) diff --git a/lazy_loader/__init__.py b/lazy_loader/__init__.py index ff3f5ce..deea54f 100644 --- a/lazy_loader/__init__.py +++ b/lazy_loader/__init__.py @@ -112,7 +112,7 @@ def __getattr__(self, x): fd = self.__frame_data raise ModuleNotFoundError( f"{self.__message}\n\n" - "This error is lazily reported, having originally occured in\n" + "This error is lazily reported, having originally occurred in\n" f' File {fd["filename"]}, line {fd["lineno"]}, in {fd["function"]}\n\n' f'----> {"".join(fd["code_context"] or "").strip()}' )