diff --git a/src/Year_2015/P7.py b/src/Year_2015/P7.py index 62c57bf..d4d21bd 100644 --- a/src/Year_2015/P7.py +++ b/src/Year_2015/P7.py @@ -81,7 +81,7 @@ def rshift_gate(x: int, y: int) -> int: @functools.lru_cache() -def rec_solve(node): +def rec_solve(node: str) -> int: if node.isdigit(): return int(node) instruction = gates[node] @@ -109,7 +109,7 @@ for instr in instructions: gates[rhs.strip()] = lhs.strip().split() -def part_1(): +def part_1() -> None: signal_a = rec_solve("a") print(f"Signal A will be ultimately {signal_a}") @@ -121,7 +121,7 @@ def part_1(): # provided to wire a? -def part_2(): +def part_2() -> None: signal_a = rec_solve("a") rec_solve.cache_clear() gates["b"] = [str(signal_a)]