Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove useless return #648

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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