8000 Merge pull request #22777 from matthewfeickert/mnt/add-codespell-to-p… · matplotlib/matplotlib@7661d53 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7661d53

Browse files
authored
Merge pull request #22777 from matthewfeickert/mnt/add-codespell-to-pre-commit-hooks
DEV: Add codespell to pre-commit hooks
2 parents 357276b + 20da81f commit 7661d53

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,14 @@ repos:
2828
- id: flake8
2929
additional_dependencies: [pydocstyle>5.1.0, flake8-docstrings>1.4.0]
3030
args: ["--docstring-convention=all"]
31+
- repo: https://github.com/codespell-project/codespell
32+
rev: v2.1.0
33+
hooks:
34+
- id: codespell
35+
files: ^.*\.(py|c|cpp|h|m|md|rst|yml)$
36+
args: [
37+
"--ignore-words",
38+
"ci/codespell-ignore-words.txt",
39+
"--skip",
40+
"doc/users/project/credits.rst"
41+
]

ci/codespell-ignore-words.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
ans
2+
axises
3+
ba
4+
cannotation
5+
coo
6+
curvelinear
7+
flate
8+
hist
9+
inout
10+
ment
11+
nd
12+
oly
13+
sur
14+
te
15+
thisy
16+
whis
17+
wit

lib/matplotlib/tests/test_cbook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def test_func2():
420420
('# only comment "with quotes" xx', ''),
421421
])
422422
def test_strip_comment(line, result):
423-
"""Strip everything from the first unqouted #."""
423+
"""Strip everything from the first unquoted #."""
424424
assert cbook._strip_comment(line) == result
425425

426426

0 commit comments

Comments
 (0)
0