Skip to content

Commit fbb2780

Browse files
authored
Merge pull request #85 from bobleesj/codespell
Add Codespell in pre-commit, fix typos
2 parents 8f92a86 + f56e499 commit fbb2780

File tree

7 files changed

+56
-3
lines changed

7 files changed

+56
-3
lines changed

.codespell/ignore_lines.txt

Lines changed: 2 additions & 0 deletions
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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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
12+
13+
;; parameter in xtick.direction in matplotlib i.g. in, out, inout
14+
inout
15+
16+
;; repository name: https://github.com/regro/rever
17+
rever

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
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

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ You can also update style parameters locally by using the matplotlib style conte
145145
plt.ylabel('some numbers')
146146
plt.show()
147147

148-
Here are a snapshot of values in ``all_styles["bg-style"]`` sheet which you may override with ``rc.parms`` to fine tune things: ::
148+
Here are a snapshot of values in ``all_styles["bg-style"]`` sheet which you may override with ``rc.params`` to fine tune things: ::
149149

150150
'lines.linewidth': 2.50,
151151
'lines.markeredgewidth': 0.25,
@@ -307,7 +307,7 @@ trying to commit again.
307307

308308
Improvements and fixes are always appreciated.
309309

310-
Before contribuing, please read our `Code of Conduct <https://github.com/Billingegroup/bg-mpl-stylesheets/blob/main/CODE_OF_CONDUCT.rst>`_.
310+
Before contributing, please read our `Code of Conduct <https://github.com/Billingegroup/bg-mpl-stylesheets/blob/main/CODE_OF_CONDUCT.rst>`_.
311311

312312
Contact
313313
-------

news/codespell.rst

Lines changed: 23 additions & 0 deletions
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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ namespaces = false # to disable scanning PEP 420 namespaces (true by default)
5151
[tool.setuptools.dynamic]
5252
dependencies = {file = ["requirements/pip.txt"]}
5353

54+
[tool.codespell]
55+
exclude-file = ".codespell/ignore_lines.txt"
56+
ignore-words = ".codespell/ignore_words.txt"
57+
skip = "*.cif,*.dat"
58+
5459
[tool.black]
5560
line-length = 115
5661
include = '\.pyi?$'

src/bg_mpl_stylesheets/bg_mpl_stylesheet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ figure.facecolor : w ## figure facecolor; 0.75 is scalar gray
524524
#savefig.format : png ## png, ps, pdf, svg
525525
savefig.bbox : tight ## 'tight' or 'standard'.
526526
## 'tight' is incompatible with pipe-based animation
527-
## backends but will workd with temporary file based ones:
527+
## backends but will work with temporary file based ones:
528528
## e.g. setting animation.writer to ffmpeg will not work,
529529
## use ffmpeg_file instead
530530
#savefig.pad_inches : 0.1 ## Padding to be used when bbox is set to 'tight'

0 commit comments

Comments
 (0)