From 37bac3d708c8eb11f897ea09dfe94acabe5fdba1 Mon Sep 17 00:00:00 2001 From: Joris Vincent Date: Fri, 22 Sep 2023 15:20:54 +0200 Subject: [PATCH] build: configure `codespell` to fix misspellings Requires python^3.11.0 to use pyproject.toml Exclude everything in `docs/_build`, and the exact lines in `.codespell.ignore` Also add to pre-commit checks --- .codespell.ignore | 2 ++ .pre-commit-config.yaml | 7 ++++++- pyproject.toml | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .codespell.ignore diff --git a/.codespell.ignore b/.codespell.ignore new file mode 100644 index 0000000..dca8568 --- /dev/null +++ b/.codespell.ignore @@ -0,0 +1,2 @@ + **F**indable, **A**ccessible, **I**nteroperable, and **R**eusable + Pflügers Archiv für die gesamte Physiologie. 3: 13-15. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4121c6d..4cd1c55 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,4 +16,9 @@ repos: hooks: - id: flake8 # Ignore all format-related checks as Black takes care of those. - args: ["--ignore", "E203,E501,W503,F403", "--select", "E,W,F", '--per-file-ignores=__init__.py:F401,F405,E402', '--exclude','tests/*'] \ No newline at end of file + args: ["--ignore", "E203,E501,W503,F403", "--select", "E,W,F", '--per-file-ignores=__init__.py:F401,F405,E402', '--exclude','tests/*'] + + - repo: https://github.com/codespell-project/codespell + rev: v2.2.4 + hooks: + - id: codespell \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c95416e..01da14f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,3 +84,8 @@ type = "github" [tool.semantic_release.publish] upload_to_vcs_release = true # upload sdist, wheel to release-tag + + +[tool.codespell] +skip = "./docs/_build/*" +exclude-file = ".codespell.ignore"