Skip to content

Commit

Permalink
style: move codespell configuration to pyproject.toml
Browse files Browse the repository at this point in the history
So people could just run "codespell" without pre-commit and have centralized configuration for tools (the others are already in pyproject.toml)

Signed-off-by: Yaroslav Halchenko <debian@onerussian.com>
  • Loading branch information
yarikoptic authored and Lee-W committed May 22, 2024
1 parent ee14038 commit 1d7995d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ repos:
hooks:
- id: codespell
name: Run codespell to check for common misspellings in files
# config section is within pyproject.toml
language: python
types: [ text ]
args: [ "--write-changes", "--ignore-words-list", "asend" ]
exclude: "poetry.lock"
args: [ "--write-changes" ]

- repo: https://github.com/commitizen-tools/commitizen
rev: v3.26.1 # automatically updated by Commitizen
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,9 @@ warn_unused_configs = true
[[tool.mypy.overrides]]
module = "py.*" # Legacy pytest dependencies
ignore_missing_imports = true

[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = '.git*,*.svg,*.lock'
check-hidden = true
ignore-words-list = 'asend'

0 comments on commit 1d7995d

Please sign in to comment.