Skip to content

Commit

Permalink
Adapted to arcade dev 28
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCheese42 committed Jun 1, 2024
1 parent 741c26f commit 8cd2ee5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
4 changes: 2 additions & 2 deletions cme/concurrency/multiprocesses.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def start_worker_process(
kwargs: Mapping[str, Any] = {},
daemon: Optional[bool] = None,
callback: Optional[Callable[[], None]] = None,
) -> multiprocessing.Queue[Any]:
) -> multiprocessing.Queue:
"""
Opens a worker process for heavy, blocking tasks. Enables usage of multiple
CPUs. If this is not required `start_helper_thread` might be a better pick.
Expand Down Expand Up @@ -54,7 +54,7 @@ def setup_worker_process(
target: Callable[[], Any],
name: Optional[str] = None,
daemon: Optional[bool] = None,
) -> multiprocessing.Queue[Any]:
) -> multiprocessing.Queue:
"""
Set up a permanent worker process processing on demand. This can be useful
to avoid process create overhead. To use, simply store the queue returned
Expand Down
29 changes: 16 additions & 13 deletions cme/shapes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@

from arcade import (draw_arc_filled, draw_arc_outline, draw_circle_filled,
draw_circle_outline, draw_ellipse_filled,
draw_ellipse_outline, draw_line, draw_line_strip,
draw_lines, draw_lrtb_rectangle_filled,
draw_lrtb_rectangle_outline, draw_lrwh_rectangle_textured,
draw_ellipse_outline, draw_lbwh_rectangle_filled,
draw_lbwh_rectangle_outline, draw_lbwh_rectangle_textured,
draw_line, draw_line_strip, draw_lines,
draw_lrbt_rectangle_filled, draw_lrbt_rectangle_outline,
draw_parabola_filled, draw_parabola_outline, draw_point,
draw_points, draw_polygon_filled, draw_polygon_outline,
draw_rectangle_filled, draw_rectangle_outline,
draw_rect_filled, draw_rect_filled_kwargs,
draw_rect_outline, draw_rect_outline_kwargs,
draw_scaled_texture_rectangle, draw_texture_rectangle,
draw_triangle_filled, draw_triangle_outline,
draw_xywh_rectangle_filled, draw_xywh_rectangle_outline)
draw_triangle_filled, draw_triangle_outline)
from arcade.isometric import (create_isometric_grid_lines,
isometric_grid_to_screen,
screen_to_isometric_grid)
Expand Down Expand Up @@ -69,26 +70,28 @@
"draw_circle_outline",
"draw_ellipse_filled",
"draw_ellipse_outline",
"draw_lbwh_rectangle_filled",
"draw_lbwh_rectangle_outline",
"draw_lbwh_rectangle_textured",
"draw_line",
"draw_line_strip",
"draw_lines",
"draw_lrtb_rectangle_filled",
"draw_lrtb_rectangle_outline",
"draw_lrwh_rectangle_textured",
"draw_lrbt_rectangle_filled",
"draw_lrbt_rectangle_outline",
"draw_parabola_filled",
"draw_parabola_outline",
"draw_point",
"draw_points",
"draw_polygon_filled",
"draw_polygon_outline",
"draw_rectangle_filled",
"draw_rectangle_outline",
"draw_rect_filled",
"draw_rect_filled_kwargs",
"draw_rect_outline",
"draw_rect_outline_kwargs",
"draw_scaled_texture_rectangle",
"draw_texture_rectangle",
"draw_triangle_filled",
"draw_triangle_outline",
"draw_xywh_rectangle_filled",
"draw_xywh_rectangle_outline",
"Ellipse",
"Group",
"isometric_grid_to_screen",
Expand Down
4 changes: 2 additions & 2 deletions cme/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from collections import defaultdict
from typing import Any, Optional

from arcade.types import FloatRect, Rect
from arcade.types import Rect
from pyglet.text import Label


Expand Down Expand Up @@ -104,7 +104,7 @@ def str2bool(string: str, return_false_on_error: bool = False) -> bool:
return out


def point_in_rect(x: float, y: float, rect: Rect | FloatRect) -> bool:
def point_in_rect(x: float, y: float, rect: Rect) -> bool:
"""
Find out wether the specified point is inside a rectangle.
Expand Down

0 comments on commit 8cd2ee5

Please sign in to comment.