summaryrefslogtreecommitdiffstats
path: root/aoc
diff options
context:
space:
mode:
Diffstat (limited to 'aoc')
-rw-r--r--aoc/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/aoc/__init__.py b/aoc/__init__.py
index 7a089f6..0257b69 100644
--- a/aoc/__init__.py
+++ b/aoc/__init__.py
@@ -17,8 +17,8 @@ class BaseAssignment(Generic[T, I], ABC):
17 def __str__(self): 17 def __str__(self):
18 return f"{self.__module__}.{self.__class__.__name__}" 18 return f"{self.__module__}.{self.__class__.__name__}"
19 19
20 def parse_item(self, item: str) -> I: 20 def parse_item(self, item: str) -> Iterator[I]:
21 return item 21 yield item
22 22
23 @property 23 @property
24 def part(self) -> int: 24 def part(self) -> int:
@@ -37,7 +37,7 @@ class BaseAssignment(Generic[T, I], ABC):
37 37
38 with open(file, "r") as input_file: 38 with open(file, "r") as input_file:
39 for line in input_file.readlines(): 39 for line in input_file.readlines():
40 yield self.parse_item(line.strip("\n")) 40 yield from self.parse_item(line.strip("\n"))
41 41
42 def run(self, input: Iterator[I]) -> T: 42 def run(self, input: Iterator[I]) -> T:
43 raise NotImplementedError("Please implement run") 43 raise NotImplementedError("Please implement run")