Skip to content

Commit f9477fd

Browse files
committed
Attempt to work around broken mypy
1 parent 822e25e commit f9477fd

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
@@ -279,9 +279,12 @@ def draw_rect_outline(
279279
o_right = right + HALF_BORDER
280280
o_top = top + HALF_BORDER
281281

282+
# Declared separately because the code below seems to break mypy
283+
point_list: PointList
284+
282285
# This is intentionally unrolled to minimize repacking tuples
283286
if tilt_angle == 0:
284-
point_list: PointList = (
287+
point_list = (
285288
(o_left , o_top ),
286289
(i_left , i_top ),
287290
(o_right , o_top ),
@@ -294,7 +297,7 @@ def draw_rect_outline(
294297
(i_left , i_top )
295298
)
296299
else:
297-
point_list: PointList = (
300+
point_list = (
298301
rotate_point(o_left , o_top , x, y, tilt_angle),
299302
rotate_point(i_left , i_top , x, y, tilt_angle),
300303
rotate_point(o_right , o_top , x, y, tilt_angle),

0 commit comments

Comments
 (0)