Skip to content

Commit 6ad7b0e

Browse files
Move codespell options around (#1196)
Starting with codespell 2.2.2, options can be specified in `pyrpoject.toml` in addition to `setup.cfg`: https://github.com/codespell-project/codespell#using-a-config-file Specifying options in a config file instead of command line options in `.pre-commit-config.yaml` ensures codespell uses the same options when run as pre-commit hook or from the command line in the repository root directory.
1 parent 5954ff9 commit 6ad7b0e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.pre-commit-config.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ repos:
2121
rev: v2.2.5
2222
hooks:
2323
- id: codespell
24-
args: ["-L", "ba,ihs,kake,nd,noe,nwo,te,fo,zar", "-S", "fixture"]
2524
- repo: https://github.com/pre-commit/pre-commit-hooks
2625
rev: v4.4.0
2726
hooks:

pyproject.toml

+5
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,8 @@ filterwarnings = [
137137
"ignore:PY_SSIZE_T_CLEAN will be required.*:DeprecationWarning",
138138
"ignore:The loop argument is deprecated since Python 3.8.*:DeprecationWarning",
139139
]
140+
141+
142+
[tool.codespell]
143+
ignore-words-list = "ba,ihs,kake,nd,noe,nwo,te,fo,zar"
144+
skip = 'fixture,.git'

0 commit comments

Comments
 (0)