Skip to content

Commit

Permalink
cleanup 7
Browse files Browse the repository at this point in the history
  • Loading branch information
Stegallo committed Dec 8, 2024
1 parent fa5d530 commit 8d1a808
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions y_2024/day7.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
from typing import Optional
from typing import Optional, Callable

from pydantic.dataclasses import dataclass

from common.aoc import AoCDay


def add(a, b):
def add(a: int, b: int) -> int:
return a + b


def mul(a, b):
def mul(a: int, b: int) -> int:
return a * b


def conc(a, b):
def conc(a: int, b: int) -> int:
return int(str(a) + str(b))


Expand All @@ -27,7 +27,7 @@ def __post_init__(self) -> None:
self.result = int(self.original.split(": ")[0])
self.op_list = [int(i) for i in self.original.split(": ")[1].split(" ")]

def do(self, lst: list[int], ops: list) -> bool:
def do(self, lst: list[int], ops: list[Callable]) -> bool:
if len(lst) == 1:
return lst[0] == self.result

Expand Down

0 comments on commit 8d1a808

Please sign in to comment.