Skip to content

Commit

Permalink
chore: remove useless return
Browse files Browse the repository at this point in the history
  • Loading branch information
Rotzbua committed Mar 19, 2024
1 parent cf56881 commit 7987634
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
11 changes: 3 additions & 8 deletions boxes/generators/frontpanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,25 +145,22 @@ def __init__(self) -> None:
def applyOffset(self, x, y):
return (x+self.offset[0], y+self.offset[1])

def drawRect(self, x, y, w, h, r=0, center_x="True", center_y="True"):
def drawRect(self, x, y, w, h, r=0, center_x="True", center_y="True") -> None:
x, y, w, h, r = (float(i) for i in [x, y, w, h, r])
x, y = self.applyOffset(x, y)
center_x = str_to_bool(center_x)
center_y = str_to_bool(center_y)
self.rectangularHole(x, y, w, h, r, center_x, center_y)
return

def drawCircle(self, x, y, r):
def drawCircle(self, x, y, r) -> None:
x, y, r = (float(i) for i in [x, y, r])
x, y = self.applyOffset(x, y)
self.hole(x, y, r)
return

def drawMountingHole(self, x, y, d_shaft, d_head=0.0, angle=0):
def drawMountingHole(self, x, y, d_shaft, d_head=0.0, angle=0) -> None:
x, y, d_shaft, d_head, angle = (float(i) for i in [x, y, d_shaft, d_head, angle])
x, y = self.applyOffset(x, y)
self.mountingHole(x, y, d_shaft, d_head, angle)
return

def drawOutline(self, w, h):
w, h = (float(i) for i in [w, h])
Expand All @@ -175,7 +172,6 @@ def drawOutline(self, w, h):
x, y = self.applyOffset(x, y)
border = [(x, y), (x+w, y), (x+w, y+h), (x, y+h), (x, y)]
self.showBorderPoly( border )
return

def drawText(self, x, y, size, text, angle=0, align='bottom|left'):
x, y, size, angle = (float(i) for i in [x, y, size, angle])
Expand Down Expand Up @@ -208,7 +204,6 @@ def parse_layout(self, layout):
la = shlex.split(l, comments=True, posix=True)
if len(la) > 0 and la[0].lower() in objects:
objects[la[0]](*la[1:])
return

def render(self):
self.offset = (0.0, 0.0)
Expand Down
3 changes: 0 additions & 3 deletions boxes/generators/gridfinitybase.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def create_base_plate(self):
nx, ny = self.x, self.y
opening = self.opening
self.rectangularWall(nx*pitch, ny*pitch, move="up", callback=[self.generate_grid])
return

def create_tray(self):
pitch = self.pitch
Expand All @@ -82,8 +81,6 @@ def create_tray(self):
if self.bottom_edge != "e":
self.rectangularWall(x, y, "ffff", move="up")

return

def render(self):
self.create_base_plate()
self.create_tray()
Expand Down

0 comments on commit 7987634

Please sign in to comment.