Skip to content

Commit 19e9b1d

Browse files
Rotzbuaflorianfesti
authored andcommitted
Fix typos
Prepare testing folder boxes by adding ignore-words-list
1 parent c67c724 commit 19e9b1d

18 files changed

+52
-47
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ repos:
7979
hooks:
8080
- id: codespell
8181
exclude: ^(boxes|locale|po|static)/ # todo folder boxes
82+
additional_dependencies:
83+
- tomli
8284

8385
- repo: local
8486
hooks:

boxes/generators/dicebox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
class DiceBox(Boxes):
20-
"""Box with lid and integraded hinge for storing dice"""
20+
"""Box with lid and integrated hinge for storing dice."""
2121

2222
ui_group = "Box"
2323

boxes/generators/displayshelf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def generate_finger_holes(self):
8383
self.moveTo(0, self.edges["h"].startwidth())
8484

8585
if (h - abs(hs) - 3*t * (self.num - 1)) < 0:
86-
raise ValueError("Need more hight to fit shelves")
86+
raise ValueError("Need more height to fit shelves")
8787
for i in range(self.num):
8888
pos_x = abs(0.5 * t * math.sin(a))
8989
pos_y = hs - math.cos(a) * 0.5 * t + i * (h - abs(hs)) / (self.num - 0.5) + b_offs

boxes/generators/fatballdispenser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class FatBallDispenser(Boxes):
4848
* The bracket is also "U" shaped and a bit wider than the spacer. This is glued to the
4949
bottom of the spacer and holds the cage (bottom part).
5050
51-
The bottom part (cage) consists of the follwoing elements:
51+
The bottom part (cage) consists of the following elements:
5252
5353
* The ceiling is N sided with the central refill hole and N smaller holes into which
5454
the poles are fitted.
@@ -63,7 +63,7 @@ class FatBallDispenser(Boxes):
6363
* A hook (e.g. M5x50mm)
6464
* A washer to distribute the load of the hook to the support piece
6565
* One or two nuts to secure the hook
66-
* Optional, a pice of wire mesh
66+
* Optional, a piece of wire mesh
6767
6868
Assembly:
6969

boxes/generators/frontpanel_test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
outline 60 60
2-
squre 10 20 25 34
2+
square 10 20 25 34
33
circle 10 20 40

boxes/generators/gridfinitybase.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def render(self):
120120
raise ValueError('either --size_y or --y must be provided')
121121

122122
if self.size_x == 0:
123-
# if we are producting a minimally sized base size_x will be zero
123+
# if we are producing a minimally sized base size_x will be zero
124124
self.size_x = self.x*self.pitch
125125
else:
126126
if self.x == 0:
@@ -131,7 +131,7 @@ def render(self):
131131
self.size_x = max(self.size_x, self.x*self.pitch)
132132

133133
if self.size_y == 0:
134-
# if we are producting a minimally sized base size_y will be zero
134+
# if we are producing a minimally sized base size_y will be zero
135135
self.size_y = self.y*self.pitch
136136
else:
137137
if self.y == 0:

boxes/generators/integratedhingebox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
class IntegratedHingeBox(Boxes):
20-
"""Box with lid and integraded hinge"""
20+
"""Box with lid and integrated hinge."""
2121

2222
ui_group = "Box"
2323

boxes/generators/kamishibai.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Kamishibai(_TopEdge):
5555
on the other half so that the key can be attached easily enough, but it should not fal off either)
5656
10. You should now be able to close and open all the doors
5757
Usage recommendations:
58-
1. Add your paper sheets fron one side or the other (normally you leave either left or right closed,
58+
1. Add your paper sheets from one side or the other (normally you leave either left or right closed,
5959
depending on which is more comfortable for you)
6060
2. Thick paper is easier to handle ; if you print on a home printer, use the thickest you printer can
6161
print (probably around 200 grams per square meter) ; if you want extra quality, go to a printing shop
@@ -107,11 +107,11 @@ def __init__(self) -> None:
107107
help="Back extra depth (for adding buttons for example), in multiples of thickness ; set to 0 to let the system calculate the smallest one")
108108
self.argparser.add_argument(
109109
"--PegsWidthMargin", action="store", type=float, default=0.5,
110-
help="Margin for the pegs width in mm ; set to a lower value if the pieces are forced together, a higher value if the pieces slide easily into eachother (using screws or glue to assemble)")
110+
help="Margin for the pegs width in mm ; set to a lower value if the pieces are forced together, a higher value if the pieces slide easily into each other (using screws or glue to assemble)")
111111
front_group = self.argparser.add_argument_group("Kamishibai front cover")
112112
front_group.add_argument(
113113
"--FrontCoverStyle", action="store", type=str, default="two-part lid with hinge eyes (both ends)",
114-
choices=["slide-on lid", "two-part lid with hinge eyes (both ends)", "three-part lid, higes not provided"],
114+
choices=["slide-on lid", "two-part lid with hinge eyes (both ends)", "three-part lid, hinges not provided"],
115115
help="style of the front cover")
116116
front_group.add_argument(
117117
"--FrontExtraDepth", action="store", type=int, default=4,
@@ -190,7 +190,7 @@ def boxFrontBackCallback (self, wi, hi, isFront):
190190
self.fingerHolesAt(self.thickness*1.5, self.thickness*0, hi)
191191
self.fingerHolesAt(self.thickness*2.5 + wi, self.thickness*0, hi)
192192
else :
193-
# hinge holes for 3 pane pannel
193+
# hinge holes for 3 pane panel
194194
if ((self.HingeHolesDiameter > 0) and (isFront and self.FrontCoverStyle == "three-part lid, higes not provided") or (not isFront and self.BackCoverStyle == "three-part lid, higes not provided")) :
195195
posx = self.thickness
196196
for x in self.HingeHolesBoxSeparation:
@@ -288,7 +288,7 @@ def boxTopBottom (self, wi, di, isTop, move=None, label=""):
288288
or (self.FrontCoverStyle == "three-part lid, higes not provided" and not isTop)):
289289
self.fingerHolesAt(wi/2 - self.thickness * 4, di + self.thickness * (self.BackExtraDepth + self.FrontExtraDepth + 2.5), self.thickness*16, 0)
290290

291-
# finger holes for front and back if neccessary #TODO update all this section...
291+
# finger holes for front and back if necessary #TODO update all this section...
292292
#self.fingerHolesAt(self.thickness*2, self.thickness * (self.BackExtraDepth + 2.5), wi + self.thickness*4,0)
293293
self.fingerHolesAt(self.thickness*2, self.thickness * (self.BackExtraDepth + 2.5), self.thickness*(self.LockScrewDistanceFromBorder - 3) - self.LockScrewDiameter,0)
294294
self.fingerHolesAt(self.thickness*(self.LockScrewDistanceFromBorder - 1) + self.LockScrewDiameter, self.thickness * (self.BackExtraDepth + 2.5), wi/2 - self.thickness*(self.LockScrewDistanceFromBorder - 5) - self.LockScrewDiameter*2,0)
@@ -302,7 +302,7 @@ def boxTopBottom (self, wi, di, isTop, move=None, label=""):
302302
self.fingerHolesAt(wi - self.thickness*(self.LockScrewDistanceFromBorder - 9) + self.LockScrewDiameter, di + self.thickness * (self.BackExtraDepth + 3.5), self.thickness*(self.LockScrewDistanceFromBorder - 3) - self.LockScrewDiameter,0)
303303

304304
else :
305-
# finger holes for front and back if neccessary
305+
# finger holes for front and back if necessary
306306
self.fingerHolesAt(self.thickness*2, self.thickness * (self.BackExtraDepth + 2.5), wi + self.thickness*4,0)
307307
if self.FrontExtraDepth > 0 :
308308
self.fingerHolesAt(self.thickness*2, di + self.thickness * (self.BackExtraDepth + 3.5), wi + self.thickness*4,0)
@@ -334,7 +334,7 @@ def boxTopBottom (self, wi, di, isTop, move=None, label=""):
334334
# hole for handle
335335
if (isTop and self.HandleThickness > 0 and self.HandleWidth > 0) :
336336
self.rectangularHole(self.thickness*4 + wi/2 - self.HandleWidth/2 - self.HandleMargin/2, self.thickness * (self.BackExtraDepth + 3 - self.HandleThickness/2) + di/2 - self.HandleMargin/2, self.HandleWidth + self.HandleMargin, self.thickness*self.HandleThickness + self.HandleMargin, 0, False, False)
337-
# hinge holes for 3 pane pannel
337+
# hinge holes for 3 pane panel
338338
if (isTop and (self.HingeHolesDiameter > 0) and (self.FrontCoverStyle == "three-part lid, higes not provided") and (self.HandleThickness > 0)) :
339339
posx=self.thickness*3
340340
for x in self.HingeHolesBoxSeparation:
@@ -415,7 +415,7 @@ def boxTopBottom (self, wi, di, isTop, move=None, label=""):
415415
self.move(wi + self.thickness*8, di + self.thickness * (self.FrontExtraDepth + self.BackExtraDepth + 6) + (self.thickness*3 if self.FrontCoverStyle == "two-part lid with hinge eyes (both ends)" else 0), move, label=label)
416416

417417
def boxFrontSideCallback (self, hi) :
418-
# hinge holes for 3 pane pannel
418+
# hinge holes for 3 pane panel
419419
if ((self.HingeHolesDiameter > 0) and (self.FrontCoverStyle == "three-part lid, higes not provided")) :
420420
posy=0
421421
for y in self.HingeHolesBoxSeparation:
@@ -531,9 +531,9 @@ def coverPanel1Lid (self, wi, hi, hasSubLayer = False, move=None, label=""):
531531
self.rectangularWall(wi, hi, "lmen", callback = [lambda:self.rectangularHole(wi/2, self.thickness*3.5, self.thickness, self.thickness),
532532
lambda:self.rectangularHole(hi - self.thickness*5.5, wi/2, self.thickness, self.thickness)],move=move, label=label)
533533
self.rectangularWall(wi - self.Margin, hi - self.thickness*6, "eeee", callback = [lambda:self.rectangularHole(wi/2 - self.Margin/2, self.thickness*1.5, self.thickness, self.thickness),
534-
lambda:self.rectangularHole(hi - self.thickness*7.5, wi/2 - self.Margin/2, self.thickness, self.thickness)],move=move, label="side pannel inner")
534+
lambda:self.rectangularHole(hi - self.thickness*7.5, wi/2 - self.Margin/2, self.thickness, self.thickness)],move=move, label="side panel inner")
535535
self.rectangularWall(wi - self.Margin, hi - self.thickness*6, "eeee", callback = [lambda:self.rectangularHole(wi/2 - self.Margin/2, self.thickness*1.5, self.thickness, self.thickness),
536-
lambda:self.rectangularHole(hi - self.thickness*7.5, wi/2 - self.Margin/2, self.thickness, self.thickness)],move=move, label="side pannel inner")
536+
lambda:self.rectangularHole(hi - self.thickness*7.5, wi/2 - self.Margin/2, self.thickness, self.thickness)],move=move, label="side panel inner")
537537
self.rectangularWall (self.thickness + self.PegsWidthMargin, self.thickness * 3, "eeee", move=move, label="")
538538
self.rectangularWall (self.thickness + self.PegsWidthMargin, self.thickness * 3, "eeee", move=move, label="")
539539
# back or front (with key holder if necessary)
@@ -580,7 +580,7 @@ def coverPanel2Side(self, wi, hi, lockStyle, move=None, label=""):
580580
def coverPanel3Side (self, wi, hi, lockStyle, move=None, label=""):
581581
if self.move(wi/2 + self.thickness*2, hi *3/4 + self.thickness*2, move, True):
582582
return
583-
# hinge holes for 3 pane pannel
583+
# hinge holes for 3 pane panel
584584
if (self.HingeHolesDiameter > 0) :
585585
posy=0
586586
for y in self.HingeHolesCoverSeparation:
@@ -617,7 +617,7 @@ def coverPanel3Top (self, wi, hi, lockStyle, move=None, label=""):
617617
elif lockStyle == "simple" :
618618
self.hole((wi + self.thickness*2)/2, hi/2 - self.thickness*2.5, self.thickness*2)
619619
self.rectangularHole((wi + self.thickness*2)/2, hi/2 - self.thickness*2.5, self.thickness, self.thickness, 0, color=Color.MAGENTA)
620-
# hinge holes for 3 pane pannel
620+
# hinge holes for 3 pane panel
621621
if (self.HingeHolesDiameter > 0) :
622622
posx=0
623623
for x in self.HingeHolesCoverSeparation:
@@ -652,7 +652,7 @@ def lockSimple (self, move=None):
652652
return
653653
self.parts.disc(self.thickness*10, dwidth=0.8, callback=lambda:self.rectangularHole(0, 0, self.thickness, self.thickness))
654654
self.move(self.thickness*11, self.thickness*11, move, label="lock internal")
655-
# discs attachement
655+
# discs attachment
656656
self.rectangularWall(self.thickness*4, self.thickness + self.PegsWidthMargin, "eeee", move=move)
657657

658658
def lockExtra (self, move=None):
@@ -676,7 +676,7 @@ def lockExtra (self, move=None):
676676
return
677677
self.parts.disc(self.thickness*8 - self.Margin, dwidth=0.8, callback=lambda:self.rectangularHole(0, 0, self.thickness, self.thickness))
678678
self.move(self.thickness*8 - self.Margin, self.thickness*8 - self.Margin, move, label="lock locker")
679-
# discs attachement
679+
# discs attachment
680680
self.rectangularWall(self.thickness*5, self.thickness + self.PegsWidthMargin, "eeee", move=move)
681681

682682
def keyHoles(self, centerHoleLength, isRotated=False):
@@ -713,7 +713,7 @@ def lockWithKey (self, isInnerLockRorated = False, move=None):
713713
return
714714
self.parts.disc(self.thickness*15, dwidth=12/15, callback=lambda:self.keyHoles(0, isInnerLockRorated))
715715
self.move(self.thickness*15, self.thickness*15, move, label="lock internal")
716-
# discs attachement
716+
# discs attachment
717717
self.rectangularWall(self.thickness*4, self.thickness + self.PegsWidthMargin, "eeee", move=move)
718718
self.rectangularWall(self.thickness*4, self.thickness + self.PegsWidthMargin, "eeee", move=move)
719719
# key

boxes/generators/nightlightbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __init__(self) -> None:
7474
BackSideOptions_group = self.argparser.add_argument_group("Night lightbox options for the back side (holes for connectors, marking)")
7575
BackSideOptions_group.add_argument(
7676
"--BackExtraHoles", action="store", type=str, default="R 20 15 11.5 8\nC 11.58 15 3\nC 28.42 15 3",
77-
help="extra holes for connectors or buttons ; enter one line per hole ; first parameter chould be R for rectangle or C for circle ; then X and Y position for the center of the hole, and then the X and Y size of the rectangle or the circle diameter, all in mm ; parameters should be separated by spaces")
77+
help="extra holes for connectors or buttons ; enter one line per hole ; first parameter should be R for rectangle or C for circle ; then X and Y position for the center of the hole, and then the X and Y size of the rectangle or the circle diameter, all in mm ; parameters should be separated by spaces")
7878

7979

8080

boxes/generators/roundedregularbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

2121
class RoundedRegularBox(boxes.Boxes):
22-
"""Regular polygone box with vertical edges rounded"""
22+
"""Regular polygon box with rounded vertical edges."""
2323

2424
description = """
2525
![Lids off](static/samples/RoundedRegularBox2.jpg)

boxes/generators/trayinsert.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class TrayInsert(Boxes):
2424
You can specify the grid sizes with the standard `(sx, sy)` format, which allows nice
2525
variable rows and columns. If you check the `outside` box, the full outside of the
2626
tray insert ends up being the sum of all the sx/sy values. However, if you want a
27-
consistent cell size, and uncheck outside, then the overall dimensinos end up
28-
larger by `(n-1)*thickenss`, to make space for your walls.
27+
consistent cell size, and uncheck outside, then the overall dimensions end up
28+
larger by `(n-1)*thickness`, to make space for your walls.
2929
3030
You can specify the `x` and `y` parameters if you like, just make them larger than
3131
what the sum of `(sx, sy)` would end up with, and the walls be automatically extended to

examples/DiceBox.svg

Lines changed: 2 additions & 2 deletions
Loading

examples/FatBallDispenser.svg

Lines changed: 4 additions & 4 deletions
Loading

examples/IntegratedHingeBox.svg

Lines changed: 2 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)