Skip to content

Commit ecf61eb

Browse files
henryiiiandrzejnovak
authored andcommitted
style: add spell checking
1 parent a6ef37a commit ecf61eb

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,10 @@ repos:
5858
files: src
5959
additional_dependencies: [uhi~=0.3.0, numpy~=1.22.0]
6060
args: [--show-error-codes]
61+
62+
- repo: https://github.com/codespell-project/codespell
63+
rev: "v2.1.0"
64+
hooks:
65+
- id: codespell
66+
args: ["-L", "hist,heros"]
67+
exclude: "^examples/Examples.ipynb$"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ hep.style.use({"font.sans-serif":'Comic Sans MS'})
130130
# Notes
131131

132132
## Consistency \& Fonts
133-
As it is ROOT does not come with any fonts and therefore relies on using system fonts. Therfore the font in a figure can be dependent on whether it was produced on OSX or PC. The default sans-serif font used is Helvetica, but it only comes with OSX, in Windows this will silently fallback to Arial.
133+
As it is ROOT does not come with any fonts and therefore relies on using system fonts. Therefore the font in a figure can be dependent on whether it was produced on OSX or PC. The default sans-serif font used is Helvetica, but it only comes with OSX, in Windows this will silently fallback to Arial.
134134

135135
### License
136136
Both Helvetica and Arial are proprietary, which as far as fonts go means you can use it to create any text/graphics once you have the license, but you cannot redistribute the font files as part of other software. That means we cannot just package Helvetica with this to make sure everyone has the same font in plots.
@@ -146,7 +146,7 @@ You can compare yourself if the differences are meanigful below.
146146
<img src="img/FontComp.png" width="400" />
147147
</p>
148148

149-
They are Tex Gyre Heros, Helvetica and Arial respecively.
149+
They are Tex Gyre Heros, Helvetica and Arial respectively.
150150

151151
### Math Fonts
152152
- Math fonts are a separate set from regular fonts due to the amount of special characters

docs/source/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Primary functions.
1111

1212
.. autofunction:: mplhep.hist2dplot
1313

14-
.. # List all modules when apropriately privatized
14+
.. # List all modules when appropriately privatized
1515
.. automodule:: mplhep.plot
1616
:members:
1717

src/mplhep/label.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def exp_text(
4444
Secondary experiment label, typically not-bold and smaller
4545
font-size. For example "Simulation" or "Preliminary"
4646
loc : int, optional
47-
Label positon:
47+
Label position:
4848
- 0 : Above axes, left aligned
4949
- 1 : Top left corner
5050
- 2 : Top left corner, multiline
@@ -248,7 +248,7 @@ def exp_label(
248248
Parameters
249249
----------
250250
loc : int, optional
251-
Label positon of ``exp_text`` label:
251+
Label position of ``exp_text`` label:
252252
- 0 : Above axes, left aligned
253253
- 1 : Top left corner
254254
- 2 : Top left corner, multiline
@@ -406,7 +406,7 @@ def savelabels(
406406
]
407407
If supplied strings contain suffixes such as ".png" the names will be assumed
408408
to be absolute and will ignore ``fname``.
409-
If current label contains "Simulation" this will be perserved.
409+
If current label contains "Simulation" this will be preserved.
410410
"""
411411
if labels is None:
412412
labels = [

src/mplhep/plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ def hist2dplot(
438438
Array of per-bin labels to display. If ``True`` will
439439
display numerical values
440440
cbar : bool, optional, default True
441-
Draw a colorbar. In contrast to mpl behaviours the cbar axes is
441+
Draw a colorbar. In contrast to mpl behaviors the cbar axes is
442442
appended in such a way that it doesn't modify the original axes
443443
width:height ratio.
444444
cbarsize : str or float, optional, default "7%"

0 commit comments

Comments
 (0)