Skip to content

Commit dba777e

Browse files
authored
Merge pull request diffpy#125 from yucongalicechen/spelling
add codespell
2 parents 651248d + 7f59e18 commit dba777e

File tree

5 files changed

+47
-0
lines changed

5 files changed

+47
-0
lines changed

.codespell/ignore_lines.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
;; Please include filenames and explanations for each ignored line.
2+
;; See https://docs.openverse.org/meta/codespell.html for docs.

.codespell/ignore_words.txt

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
;; Please include explanations for each ignored word (lowercase).
2+
;; See https://docs.openverse.org/meta/codespell.html for docs.
3+
4+
;; abbreviation for "materials" often used in a journal title
5+
mater
6+
7+
;; alternative use of socioeconomic
8+
socio-economic
9+
10+
;; Frobenius norm used in np.linalg.norm
11+
fro

.pre-commit-config.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,9 @@ repos:
4444
name: Prevent Commit to Main Branch
4545
args: ["--branch", "main"]
4646
stages: [pre-commit]
47+
- repo: https://github.com/codespell-project/codespell
48+
rev: v2.3.0
49+
hooks:
50+
- id: codespell
51+
additional_dependencies:
52+
- tomli

news/codespell.rst

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* Spelling check via Codespell in pre-commit
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* <news item>
20+
21+
**Security:**
22+
23+
* <news item>

pyproject.toml

+5
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ namespaces = false # to disable scanning PEP 420 namespaces (true by default)
5454
[tool.setuptools.dynamic]
5555
dependencies = {file = ["requirements/pip.txt"]}
5656

57+
[tool.codespell]
58+
exclude-file = ".codespell/ignore_lines.txt"
59+
ignore-words = ".codespell/ignore_words.txt"
60+
skip = "*.cif"
61+
5762
[tool.black]
5863
line-length = 115
5964
include = '\.pyi?$'

0 commit comments

Comments
 (0)