Skip to content

Commit e7bb38b

Browse files
committed
Attempt to work around broken mypy
1 parent d0ab9aa commit e7bb38b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

arcade/draw/rect.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,12 @@ def draw_rect_outline(
239239
o_right = right + HALF_BORDER
240240
o_top = top + HALF_BORDER
241241

242+
# Declared separately because the code below seems to break mypy
243+
point_list: PointList
244+
242245
# This is intentionally unrolled to minimize repacking tuples
243246
if tilt_angle == 0:
244-
point_list: PointList = (
247+
point_list = (
245248
(o_left , o_top ),
246249
(i_left , i_top ),
247250
(o_right , o_top ),
@@ -254,7 +257,7 @@ def draw_rect_outline(
254257
(i_left , i_top )
255258
)
256259
else:
257-
point_list: PointList = (
260+
point_list = (
258261
rotate_point(o_left , o_top , x, y, tilt_angle),
259262
rotate_point(i_left , i_top , x, y, tilt_angle),
260263
rotate_point(o_right , o_top , x, y, tilt_angle),

0 commit comments

Comments
 (0)