]> Untitled Git - axy/ft/pacman.git/commitdiff
Cleanup of tests
authorAxy <gilliardmarthey.axel@gmail.com>
Fri, 25 Sep 2026 18:34:37 +0000 (20:34 +0200)
committerAxy <gilliardmarthey.axel@gmail.com>
Fri, 25 Sep 2026 18:34:37 +0000 (20:34 +0200)
src/pacman/ecs/__init__.py
src/pacman/utils/type_resolve.py
src/pacman/utils/variadics_please.py

index 6c1310da76161a395f09ddaeb278e227d3b99c00..f614e2819e03fe4ac3b1f046a4ec1f0800c5d32e 100644 (file)
@@ -183,36 +183,6 @@ def move_root(root: Query[Coord2D, WiggleRoot]) -> None:
         coord.x = 30.0 + math.cos(tick) * 30.0
 
 
-def sprite_despawn_hook() -> RawComponentHook[WiggleSprite]:
-    def inner(arg: RawComponentArg[WiggleSprite]) -> None:
-        for ent, _ in arg:
-            continue
-            print("despawn", ent)
-
-    return inner
-
-
-def sprite_spawn_hook() -> RawComponentHook[WiggleSprite]:
-    def inner(arg: RawComponentArg[WiggleSprite]) -> None:
-        for ent, _ in arg:
-            continue
-            print("spawn", ent)
-
-    return inner
-
-
-def unspawn_wiggle(
-    queue: CommandQueue, q: Query[Entity, WiggleSprite]
-) -> None:
-    lst = [(e, WiggleSprite()) for _, e in zip(range(3), q, strict=False)]
-    queue.queue(lambda world: world.insert_many(WiggleSprite, lst))
-
-
-def close_on_empty(world: World, q: Query[Entity, WiggleSprite]) -> None:
-    if next(iter(q), None) is None:
-        world.spawn(WorldShouldExit, WorldShouldExit())
-
-
 if __name__ == "__main__":
     world = (
         World()
@@ -221,11 +191,7 @@ if __name__ == "__main__":
             UpdateSchedule,
             move_sprites,
             move_root,
-            unspawn_wiggle,
-            close_on_empty,
         )
-        .with_hook("remove", WiggleSprite, sprite_despawn_hook)
-        .with_hook("insert", WiggleSprite, sprite_spawn_hook)
     )
     assets = list(Path("./asset").rglob("*.png"))
     root = world.spawn(
index d49d848d8c62ba1ab5b03b9c7f80cb435ff5bcf0..09295418e208eeb7ee56803394db7525b4de68b5 100644 (file)
@@ -45,13 +45,3 @@ def origin_or_cls(ty: Any) -> Any:
     if res is None:
         res = ty
     return res
-
-
-type B[T] = list[list[T]]
-
-type A[T] = list[tuple[T, B[int]]]
-
-if __name__ == "__main__":
-    ty = tuple[int, tuple[float, str], tuple[int, int] | float]
-    print(ty)
-    print(resolve_type_aliases(ty))
index 1ad884f036f0e29a16312a40f5ed5ac8625381f8..a96bf493ab31c9fc178492e7151220ae14bbbf22 100644 (file)
@@ -1,24 +1,6 @@
 from collections.abc import Callable, Generator
 from typing import cast
 
-type VarargCallable[T, U] = (
-    Callable[[T], U]
-    | Callable[[T, T], U]
-    | Callable[[T, T, T], U]
-    | Callable[[T, T, T, T], U]
-    | Callable[[T, T, T, T, T], U]
-    | Callable[[T, T, T, T, T, T], U]
-    | Callable[[T, T, T, T, T, T, T], U]
-    | Callable[[T, T, T, T, T, T, T, T], U]
-    | Callable[[T, T, T, T, T, T, T, T, T], U]
-    | Callable[[T, T, T, T, T, T, T, T, T, T], U]
-    | Callable[[T, T, T, T, T, T, T, T, T, T, T], U]
-    | Callable[[T, T, T, T, T, T, T, T, T, T, T, T], U]
-    | Callable[[T, T, T, T, T, T, T, T, T, T, T, T, T], U]
-    | Callable[[T, T, T, T, T, T, T, T, T, T, T, T, T, T], U]
-    | Callable[[T, T, T, T, T, T, T, T, T, T, T, T, T, T, T], U]
-)
-
 type RecursiveTuple[T] = T | tuple[RecursiveTuple[T], ...]