diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ee27ffb75..34411405e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,6 +12,13 @@ repos: - id: black language_version: python3.9 + - repo: https://github.com/codespell-project/codespell + rev: v2.4.1 + hooks: + - id: codespell # See pyproject.toml for args + additional_dependencies: + - tomli + - repo: https://github.com/pycqa/flake8 rev: 7.2.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index 4a9295d37..d765af41c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,6 +86,9 @@ target-version = [ profile = "black" py_version = "39" +[tool.codespell] +skip = "AUTHORS.rst,*.po" + [tool.coverage.run] parallel = true branch = true diff --git a/simple_history/management/commands/clean_duplicate_history.py b/simple_history/management/commands/clean_duplicate_history.py index 786be6a11..31d61ce38 100644 --- a/simple_history/management/commands/clean_duplicate_history.py +++ b/simple_history/management/commands/clean_duplicate_history.py @@ -8,7 +8,7 @@ class Command(populate_history.Command): args = "" help = ( - "Scans HistoricalRecords for identical sequencial entries " + "Scans HistoricalRecords for identical sequential entries " "(duplicates) in a model and deletes them." ) diff --git a/simple_history/models.py b/simple_history/models.py index b007efbfa..f38987cc7 100644 --- a/simple_history/models.py +++ b/simple_history/models.py @@ -672,7 +672,7 @@ def post_delete(self, instance, using=None, **kwargs): def pre_delete(self, instance, **kwargs): """ - pre_delete method to ensure all deferred fileds are loaded on the model + pre_delete method to ensure all deferred fields are loaded on the model """ # First check that history is enabled (on model and globally) if not getattr(settings, "SIMPLE_HISTORY_ENABLED", True):