day14 - cleanup typing annotations

This commit is contained in:
Stefan Harmuth 2024-12-14 09:09:38 +01:00
parent c353f58280
commit fb45c9440d

View File

@ -3,6 +3,9 @@ from tools.tools import compare
from typing import Any
type Robot = tuple[tuple[int, int], tuple[int, int]]
class Day(AOCDay):
inputs = [
[
@ -14,7 +17,7 @@ class Day(AOCDay):
],
]
def parse_input(self) -> list[tuple[tuple[int, int], tuple[int, int]]]:
def parse_input(self) -> list[Robot]:
robots = []
for line in self.getInput():
p, v = line.split()
@ -24,9 +27,7 @@ class Day(AOCDay):
return robots
def move_robots(
self, robots: list[tuple[tuple[int, int], tuple[int, int]]], steps: int = 100
) -> tuple[tuple[int, int], list[tuple[tuple[int, int], tuple[int, int]]]]:
def move_robots(self, robots: list[Robot], steps: int = 100) -> tuple[tuple[int, int], list[Robot]]:
if self.is_test():
dim = (11, 7)
else: