diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..03d4277 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,23 @@ +# Codespell configuration is within pyproject.toml +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Codespell + uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2 diff --git a/pyproject.toml b/pyproject.toml index de03ce0..1fa9ce7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ ignore = [ "TRY003", # Avoid specifying long messages outside the exception class # Excessive - "RET503", # implict return + "RET503", # implicit return "RET506", # elif after raise "PLR2004", # magic value used in comparison ] @@ -63,3 +63,10 @@ required-imports = ["from __future__ import annotations"] [tool.ruff.lint.pydocstyle] convention = "pep257" + +[tool.codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = '.git,.gitignore,.gitattributes' +check-hidden = true +# ignore-regex = '' +# ignore-words-list = ''