Skip to content

Commit

Permalink
Fix source typos
Browse files Browse the repository at this point in the history
Found via `codespell -q 3 -w -L parm,parms,re-use,substract`
  • Loading branch information
luzpaz committed Feb 7, 2025
1 parent e7aee38 commit ce7d7d9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/build123d/drafting.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ def _number_with_units(

def simplify_fraction(numerator: int, denominator: int) -> tuple[int, int]:
"""Mathematically simplify a fraction given a numerator and denominator"""
greatest_common_demoninator = gcd(numerator, denominator)
greatest_common_denominator = gcd(numerator, denominator)
return (
int(numerator / greatest_common_demoninator),
int(denominator / greatest_common_demoninator),
int(numerator / greatest_common_denominator),
int(denominator / greatest_common_denominator),
)

if display_units is None:
Expand All @@ -258,15 +258,15 @@ def simplify_fraction(numerator: int, denominator: int) -> tuple[int, int]:
return_value = f"{measurement}{unit_str}{tolerance_str}"
else:
whole_part = floor(number / IN)
(numerator, demoninator) = simplify_fraction(
(numerator, denominator) = simplify_fraction(
round((number / IN - whole_part) * self.fractional_precision),
self.fractional_precision,
)
if whole_part == 0:
return_value = f"{numerator}/{demoninator}{unit_str}{tolerance_str}"
return_value = f"{numerator}/{denominator}{unit_str}{tolerance_str}"
else:
return_value = (
f"{whole_part} {numerator}/{demoninator}{unit_str}{tolerance_str}"
f"{whole_part} {numerator}/{denominator}{unit_str}{tolerance_str}"
)

return return_value
Expand Down
6 changes: 3 additions & 3 deletions src/build123d/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1138,8 +1138,8 @@ def __init__(self, color_code: int, alpha: int = 0xFF):
"""Color from a hexadecimal color code with an optional alpha value
Args:
color_code (hexidecimal int): 0xRRGGBB
alpha (hexidecimal int): 0x00 <= alpha as hex <= 0xFF
color_code (hexadecimal int): 0xRRGGBB
alpha (hexadecimal int): 0x00 <= alpha as hex <= 0xFF
"""

def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -1733,7 +1733,7 @@ class OrientedBoundBox:
It exposes properties such as the center, principal axis directions, the
extents along these axes, and the full diagonal length of the box.
Note: The axes of the oriented bounding box are arbitary and may not be
Note: The axes of the oriented bounding box are arbitrary and may not be
consistent across platforms or time.
"""

Expand Down

0 comments on commit ce7d7d9

Please sign in to comment.