Skip to content

Commit

Permalink
Clean up redundant use of keyword args
Browse files Browse the repository at this point in the history
  • Loading branch information
mal committed Jan 29, 2024
1 parent 26551fe commit ba1bf44
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions renpy/display/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,8 @@ def get_anchorradius(self, polar_vectors=None):
"""
(absolute_vector_x, absolute_vector_y), (relative_vector_x, relative_vector_y) = polar_vectors or self.get_anchor_polar_vector()

return position(
absolute=math.hypot(absolute_vector_x, absolute_vector_y), # type: ignore
relative=math.hypot(relative_vector_x, relative_vector_y),
)
return position(math.hypot(absolute_vector_x, absolute_vector_y),
math.hypot(relative_vector_x, relative_vector_y)) # type: ignore

def set_anchorangle(self, angle):
"""
Expand Down Expand Up @@ -440,14 +438,10 @@ def set_anchor_from_anchorangle_and_anchorradius(self,
relative_dx = relative_anchorradius * math.sin(relative_anchorangle)
relative_dy = -relative_anchorradius * math.cos(relative_anchorangle)

self.xanchor = position(
absolute=xanchoraround.absolute + absolute_dx,
relative=xanchoraround.relative + relative_dx,
)
self.yanchor = position(
absolute=yanchoraround.absolute + absolute_dy,
relative=yanchoraround.relative + relative_dy,
)
self.xanchor = position(xanchoraround.absolute + absolute_dx,
xanchoraround.relative + relative_dx)
self.yanchor = position(yanchoraround.absolute + absolute_dy,
yanchoraround.relative + relative_dy)

anchorangle = property(get_anchorangle, set_anchorangle)
anchorradius = property(get_anchorradius, set_anchorradius)
Expand Down

0 comments on commit ba1bf44

Please sign in to comment.