unformatted: File would be reformatted
  --> src/heaton_life/core/fftconv.py:19:18
   |
18 |
   - def fft_convolve(
   -     field: NDArray[np.float64], kfft: NDArray[np.complex128]
   - ) -> NDArray[np.float64]:
19 + def fft_convolve(field: NDArray[np.float64], kfft: NDArray[np.complex128]) -> NDArray[np.float64]:
20 |     """Circular convolution of a real field with a precomputed kernel spectrum."""
   |

unformatted: File would be reformatted
   --> src/heaton_life/evolve/objective.py:186:15
    |
185 |
    - def _run_once(
    -     genome: str, size: tuple[int, int], seed: int, max_steps: int
    - ) -> dict[str, float]:
186 + def _run_once(genome: str, size: tuple[int, int], seed: int, max_steps: int) -> dict[str, float]:
187 |     """One convergence run: the reference's calc_objective_function body."""
    |

unformatted: File would be reformatted
  --> src/heaton_life/init/png_io.py:27:34
   |
26 |             if image.mode not in ("RGB", "RGBA"):
   -                 raise ValueError(
   -                     f"unsupported PNG mode {image.mode!r}: need 8-bit RGB or RGBA"
   -                 )
27 +                 raise ValueError(f"unsupported PNG mode {image.mode!r}: need 8-bit RGB or RGBA")
28 |             rgb = np.asarray(image)[:, :, :3]
   |

unformatted: File would be reformatted
  --> src/heaton_life/lenia/flow.py:35:38
   |
34 |     dt: float = dataclasses.field(default=2.0, metadata={"min": 0.1, "max": 8.0, "step": 0.1})
   -     theta: float = dataclasses.field(
   -         default=2.0, metadata={"min": 0.1, "max": 5.0, "step": 0.1}
   -     )
35 +     theta: float = dataclasses.field(default=2.0, metadata={"min": 0.1, "max": 5.0, "step": 0.1})
36 |     # Flow seeds SOUP, not the base class's blobs (spec/lenia.md "Parameters":
   |

unformatted: File would be reformatted
   --> tests/test_boids.py:51:12
    |
50  |     sim = Boids(
    -         60, size=(64, 64), w_separation=0.0, w_cohesion=0.0, w_alignment=1.0,
    -         perception=64.0, seed=8,
51  +         60,
52  +         size=(64, 64),
53  +         w_separation=0.0,
54  +         w_cohesion=0.0,
55  +         w_alignment=1.0,
56  +         perception=64.0,
57  +         seed=8,
58  |     )
59  +
60  |     def spread(s: Boids) -> float:
61  |         v = s.state[:, 2:4]
62  |         return float(np.var(np.arctan2(v[:, 1], v[:, 0])))
63  +
64  |     before = spread(sim)
--------------------------------------------------------------------------------
144 |     sim = Boids(
    -         50, dimensions=3, size=(96, 96), depth=96,
    -         w_separation=0.0, w_alignment=0.0, w_cohesion=0.0, seed=4,
145 +         50,
146 +         dimensions=3,
147 +         size=(96, 96),
148 +         depth=96,
149 +         w_separation=0.0,
150 +         w_alignment=0.0,
151 +         w_cohesion=0.0,
152 +         seed=4,
153 |     )
--------------------------------------------------------------------------------
169 |     sim = Boids(
    -         1, dimensions=3, size=(128, 128), depth=128, boundary="bounce",
    -         w_separation=0.0, w_alignment=0.0, w_cohesion=0.0, init=state,
170 +         1,
171 +         dimensions=3,
172 +         size=(128, 128),
173 +         depth=128,
174 +         boundary="bounce",
175 +         w_separation=0.0,
176 +         w_alignment=0.0,
177 +         w_cohesion=0.0,
178 +         init=state,
179 |     )
--------------------------------------------------------------------------------
185 | def test_3d_cohesion_pulls_together_in_z() -> None:
    -     state = np.array([
    -         [64.0, 64.0, 40.0, 1.0, 0.0, 0.0],
    -         [64.0, 64.0, 60.0, -1.0, 0.0, 0.0],
    -     ])
186 +     state = np.array(
187 +         [
188 +             [64.0, 64.0, 40.0, 1.0, 0.0, 0.0],
189 +             [64.0, 64.0, 60.0, -1.0, 0.0, 0.0],
190 +         ]
191 +     )
192 |     sim = Boids(
    -         2, dimensions=3, size=(128, 128), depth=128, w_cohesion=1.0,
    -         w_separation=0.0, w_alignment=0.0, perception=30.0, init=state,
193 +         2,
194 +         dimensions=3,
195 +         size=(128, 128),
196 +         depth=128,
197 +         w_cohesion=1.0,
198 +         w_separation=0.0,
199 +         w_alignment=0.0,
200 +         perception=30.0,
201 +         init=state,
202 |     )
--------------------------------------------------------------------------------
219 |     # near dot must be brighter (b = 0.3 + 0.7*(1 - z/depth)).
    -     state = np.array([
    -         [16.0, 16.0, 4.0, 1.0, 0.0, 0.0],
    -         [48.0, 48.0, 60.0, 1.0, 0.0, 0.0],
    -     ])
220 +     state = np.array(
221 +         [
222 +             [16.0, 16.0, 4.0, 1.0, 0.0, 0.0],
223 +             [48.0, 48.0, 60.0, 1.0, 0.0, 0.0],
224 +         ]
225 +     )
226 |     sim = Boids(
    -         2, dimensions=3, size=(64, 64), depth=64,
    -         w_separation=0.0, w_alignment=0.0, w_cohesion=0.0, init=state,
227 +         2,
228 +         dimensions=3,
229 +         size=(64, 64),
230 +         depth=64,
231 +         w_separation=0.0,
232 +         w_alignment=0.0,
233 +         w_cohesion=0.0,
234 +         init=state,
235 |     )
--------------------------------------------------------------------------------
292 |     sim = Boids(
    -         1, dimensions=3, size=(128, 128),
    -         w_separation=0.0, w_alignment=0.0, w_cohesion=0.0, init=state,
293 +         1,
294 +         dimensions=3,
295 +         size=(128, 128),
296 +         w_separation=0.0,
297 +         w_alignment=0.0,
298 +         w_cohesion=0.0,
299 +         init=state,
300 |     )
    |

unformatted: File would be reformatted
  --> tests/test_clear_rect.py:25:43
   |
24 |
   -     assert not sim.state[1:5, 1:4].any()          # inclusive corners
   -     assert sim.state[0, 0] == 1                    # outside untouched
25 +     assert not sim.state[1:5, 1:4].any()  # inclusive corners
26 +     assert sim.state[0, 0] == 1  # outside untouched
27 |     assert sim.state[5, 4] == 1
--------------------------------------------------------------------------------
57 |     sim.clear_rect(2, 2, 5, 5)
   -     assert not sim.state[2:6, 2:6, :].any()        # all three channels
58 +     assert not sim.state[2:6, 2:6, :].any()  # all three channels
59 |     assert sim.state.shape[2] == 3
--------------------------------------------------------------------------------
86 | )
   - def test_out_of_bounds_and_inverted_rectangles_are_rejected(rect: tuple[int, int, int, int]) -> None:
87 + def test_out_of_bounds_and_inverted_rectangles_are_rejected(
88 +     rect: tuple[int, int, int, int],
89 + ) -> None:
90 |     sim = LifeLike("B3/S23", size=(8, 8))
   |

unformatted: File would be reformatted
  --> tests/test_fractal_sim.py:70:42
   |
69 |     sim._counts = counts
   -     assert sim._find_target() == (30, 30)
70 +     assert sim._find_target() == (30, 30)
   |

unformatted: File would be reformatted
  --> tests/test_grayscott.py:8:22
  |
7 | def test_homogeneous_steady_state_is_exact_fixed_point() -> None:
  -     state = np.stack(
  -         [np.ones((16, 16), dtype=np.float64), np.zeros((16, 16), dtype=np.float64)]
  -     )
8 +     state = np.stack([np.ones((16, 16), dtype=np.float64), np.zeros((16, 16), dtype=np.float64)])
9 |     sim = GrayScott(size=(16, 16), init=state)
  |

unformatted: File would be reformatted
  --> tests/test_png_io_vectors.py:25:34
   |
24 |     assert meta["tier"] == "bit-exact"
   -     decoded = mergelife_from_png(
   -         (case.parent / meta["input"]).read_bytes(), meta["scale"]
   -     )
25 +     decoded = mergelife_from_png((case.parent / meta["input"]).read_bytes(), meta["scale"])
26 |     with Image.open(case.parent / meta["grid"]["file"]) as img:
   |

unformatted: File would be reformatted
  --> tests/test_vectors.py:18:16
   |
17 | VECTOR_ROOT = Path(__file__).resolve().parents[2] / "vectors"
   - CASES = sorted(
   -     p for p in VECTOR_ROOT.glob("*/*/params.json") if p.parent.parent.name in CODECS
   - )
18 + CASES = sorted(p for p in VECTOR_ROOT.glob("*/*/params.json") if p.parent.parent.name in CODECS)
19 |
--------------------------------------------------------------------------------
34 |     if meta["params"].get("init") == "array":
   -         initial = bytes_to_state(family, (case_dir / first["file"]).read_bytes(), first.get("shape"))
35 +         initial = bytes_to_state(
36 +             family, (case_dir / first["file"]).read_bytes(), first.get("shape")
37 +         )
38 |     sim = build_sim(family, meta["params"], initial)
   |

unformatted: File would be reformatted
  --> tests/test_viewport.py:41:56
   |
40 |         Viewport(center_re=float(deep))  # type: ignore[arg-type]
   -     assert Viewport(center_re=deep).center_re == deep   # quoted, it survives whole
41 +     assert Viewport(center_re=deep).center_re == deep  # quoted, it survives whole
42 |
   |

unformatted: File would be reformatted
  --> tests/test_wireworld.py:27:40
   |
26 | def test_conductor_with_three_heads_does_not_fire() -> None:
   -     pattern = wireworld_from_text("H.\n" "H#\n" "H.")
27 +     pattern = wireworld_from_text("H.\nH#\nH.")
28 |     grid = place(pattern, (6, 5), at=(1, 1))
   |

unformatted: File would be reformatted
  --> tools/gen_gallery.py:51:22
   |
50 |             "Wireworld",
   -             sim_tile(Wireworld(size=(64, 64), init=clock_loop((64, 64), margin=8)), 23, "wireworld"),
51 +             sim_tile(
52 +                 Wireworld(size=(64, 64), init=clock_loop((64, 64), margin=8)), 23, "wireworld"
53 +             ),
54 |         ),
--------------------------------------------------------------------------------
71 |             "Mandelbrot",
   -             fractal_tile(
   -                 Mandelbrot(max_iter=2000), Viewport("-0.7435", "0.1314", 2.5), "fire"
   -             ),
72 +             fractal_tile(Mandelbrot(max_iter=2000), Viewport("-0.7435", "0.1314", 2.5), "fire"),
73 |         ),
74 |         ("Julia", fractal_tile(Julia(max_iter=500), Viewport("0.0", "0.0", -0.05), "ice")),
75 |         (
76 |             "Burning Ship",
   -             fractal_tile(
   -                 BurningShip(max_iter=1500), Viewport("-1.755", "-0.03", 1.8), "violet"
   -             ),
77 +             fractal_tile(BurningShip(max_iter=1500), Viewport("-1.755", "-0.03", 1.8), "violet"),
78 |         ),
   |

unformatted: File would be reformatted
  --> tools/score_rules.py:40:18
   |
39 |     parser.add_argument(
   -         "--size", nargs=2, type=int, default=(100, 100), metavar=("W", "H"),
   -         help="lattice size (default 100 100, the paper config)")
40 +         "--size",
41 +         nargs=2,
42 +         type=int,
43 +         default=(100, 100),
44 +         metavar=("W", "H"),
45 +         help="lattice size (default 100 100, the paper config)",
46 +     )
47 |     parser.add_argument(
   -         "--cycles", type=int, default=5,
   -         help="evaluation cycles; the score is the max over them (default 5)")
48 +         "--cycles",
49 +         type=int,
50 +         default=5,
51 +         help="evaluation cycles; the score is the max over them (default 5)",
52 +     )
53 |     parser.add_argument("--seed", type=int, default=0, help="base lattice seed (default 0)")
54 |     parser.add_argument(
   -         "--repeats", type=int, default=1,
   -         help="score this many times at seed, seed+cycles, ... (default 1)")
55 +         "--repeats",
56 +         type=int,
57 +         default=1,
58 +         help="score this many times at seed, seed+cycles, ... (default 1)",
59 +     )
60 |     args = parser.parse_args()
--------------------------------------------------------------------------------
87 |     results.sort(key=lambda item: max(item[1]), reverse=True)
   -     print(f"\n{width}x{height}, {args.cycles} cycles, seed {args.seed}, "
   -           f"{args.repeats} repeat(s) — best first:")
88 +     print(
89 +         f"\n{width}x{height}, {args.cycles} cycles, seed {args.seed}, "
90 +         f"{args.repeats} repeat(s) — best first:"
91 +     )
92 |     for rank, (rule, scores) in enumerate(results, start=1):
   |

14 files would be reformatted, 187 files already formatted
