Skip to content

Commit

Permalink
Fix some linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Flova committed Dec 21, 2023
1 parent fe067e7 commit 2ba4f6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,8 @@ def generate_map_image(parameters):
goalpost_right_1 = (image_size[1] - goalpost_left_1[0], goalpost_left_1[1])
goalpost_right_2 = (image_size[1] - goalpost_left_2[0], goalpost_left_2[1])

goal_back_corner_left_1 = (goalpost_left_1[0] - goal_depth, goalpost_left_1[1])
goal_back_corner_left_2 = (goalpost_left_2[0] - goal_depth, goalpost_left_2[1])

goal_back_corner_right_1 = (goalpost_right_1[0] + goal_depth, goalpost_right_1[1])
goal_back_corner_right_2 = (goalpost_right_2[0] + goal_depth, goalpost_right_2[1])
goal_back_corner_left = (goalpost_left_2[0] - goal_depth, goalpost_left_2[1])
goal_back_corner_right = (goalpost_right_2[0] + goal_depth, goalpost_right_2[1])

# Create black image in the correct size
img = np.zeros(image_size, np.uint8)
Expand Down Expand Up @@ -232,10 +229,10 @@ def generate_map_image(parameters):
# Draw goal back area
if goal_back:
img = cv2.rectangle(
img, goalpost_left_1, goal_back_corner_left_2, color, stroke_width
img, goalpost_left_1, goal_back_corner_left, color, stroke_width
)
img = cv2.rectangle(
img, goalpost_right_1, goal_back_corner_right_2, color, stroke_width
img, goalpost_right_1, goal_back_corner_right, color, stroke_width
)

if target == MapTypes.POSTS:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def display_map(self, image):

def main():
root = tk.Tk()
app = MapGeneratorGUI(root)
MapGeneratorGUI(root)
root.mainloop()


Expand Down

0 comments on commit 2ba4f6e

Please sign in to comment.