3 files changed, +3, -5
9becec8refactor(render): use collections.abc callable correctly
author
mogi <git@mogiya.dev> on 31-05-2026 21:32 UTC+1
committer
mogi <git@mogiya.dev> on 31-05-2026 21:32 UTC+1
parent4fc3492
+1, -1
    @@ -10,4 +10,4 @@ PERFECT=False
1010 ALGORITHM=prim
1111 PURE_ASCII=False
1212 SEED=42
13  -MAX_ROOM_LEN=3
  13+MAX_ROOM_LEN=4
      @@ -181,9 +181,7 @@ def run_interactive(gen: MazeGenerator, pure_ascii: bool = False) -> None:
181181         )
182182         sys.stdout.flush()
183183 
184   -    AnimFn = Callable[[MazeGenerator, int, bool], tuple[str | None, int]]
185   -
186   -    def run_anim(fn: AnimFn, *, show: bool, solve_after: bool) -> None:
   184+    def run_anim(fn: Callable, *, show: bool, solve_after: bool) -> None:
187185         """Run an animation, redraw, requeue any interrupting key."""
188186         nonlocal color_idx, show_path, pending
189187         interrupted, color_idx = fn(gen, color_idx, pure_ascii)
    @@ -46,7 +46,7 @@ class ColorSet(NamedTuple):
4646     visited: str
4747 
4848 
49  -def _color_set(sgr: Callable[[RGB], str]) -> ColorSet:
  49+def _color_set(sgr: Callable) -> ColorSet:
5050     """Build a ColorSet from an SGR encoder (_fg or _bg)."""
5151     return ColorSet(
5252         palette=[sgr(c) for c in _WALL],