Skip to content

Commit 333ce6e

Browse files
authored
Remove outdated type: ignore (#2530)
1 parent cdd6f66 commit 333ce6e

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

arcade/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ def configure_logging(level: int | None = None):
6868
# Env variable shortcut for headless mode
6969
headless: Final[bool] = bool(os.environ.get("ARCADE_HEADLESS"))
7070
if headless:
71-
pyglet.options.headless = headless # type: ignore # pending https://github.com/pyglet/pyglet/issues/1164
71+
pyglet.options.headless = headless
7272

7373

7474
from arcade import utils
7575

7676
# Disable shadow window on macs and in headless mode.
7777
if sys.platform == "darwin" or os.environ.get("ARCADE_HEADLESS") or utils.is_raspberry_pi():
78-
pyglet.options.shadow_window = False # type: ignore # pending https://github.com/pyglet/pyglet/issues/1164
78+
pyglet.options.shadow_window = False
7979

8080
# Imports from modules that don't do anything circular
8181

@@ -147,7 +147,7 @@ def configure_logging(level: int | None = None):
147147
from .screenshot import get_pixel
148148

149149
# We don't have joysticks game controllers in headless mode
150-
if not headless: # type: ignore
150+
if not headless:
151151
from .joysticks import get_game_controllers
152152
from .joysticks import get_joysticks
153153
from .controller import ControllerManager

arcade/application.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def get_screens() -> list[Screen]:
6060
List of screens, one for each monitor.
6161
"""
6262
display = pyglet.display.get_display()
63-
return display.get_screens() # type: ignore # pending: https://github.com/pyglet/pyglet/pull/1176 # noqa
63+
return display.get_screens()
6464

6565

6666
class NoOpenGLException(Exception):
@@ -228,9 +228,9 @@ def __init__(
228228
style=style,
229229
)
230230
# pending: weird import tricks resolved
231-
self.register_event_type("on_update") # type: ignore
232-
self.register_event_type("on_action") # type: ignore
233-
self.register_event_type("on_fixed_update") # type: ignore
231+
self.register_event_type("on_update")
232+
self.register_event_type("on_action")
233+
self.register_event_type("on_fixed_update")
234234
except pyglet.window.NoSuchConfigException:
235235
raise NoOpenGLException(
236236
"Unable to create an OpenGL 3.3+ context. "

arcade/geometry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def are_polygons_intersecting(poly_a: Point2List, poly_b: Point2List) -> bool:
5858
max_b = projected
5959

6060
# Avoid typing.cast() because this is a very hot path
61-
if max_a <= min_b or max_b <= min_a: # type: ignore
61+
if max_a <= min_b or max_b <= min_a:
6262
return False
6363

6464
return True

arcade/hitbox/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def _adjust_point(point) -> Point2:
240240

241241
self._adjusted_points = [_adjust_point(point) for point in self.points]
242242
self._adjusted_cache_dirty = False
243-
return self._adjusted_points # type: ignore [return-value]
243+
return self._adjusted_points
244244

245245

246246
class RotatableHitBox(HitBox):

arcade/paths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def __init__(
8888
self.bottom = bottom
8989

9090
if diagonal_movement:
91-
self.movement_directions = ( # type: ignore
91+
self.movement_directions = (
9292
(1, 0),
9393
(-1, 0),
9494
(0, 1),

0 commit comments

Comments
 (0)