summaryrefslogtreecommitdiffstats
path: root/aoc
diff options
context:
space:
mode:
Diffstat (limited to 'aoc')
-rw-r--r--aoc/__init__.py3
-rw-r--r--aoc/__main__.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/aoc/__init__.py b/aoc/__init__.py
index 0257b69..f490bf8 100644
--- a/aoc/__init__.py
+++ b/aoc/__init__.py
@@ -17,7 +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) -> Iterator[I]: 20 @classmethod
21 def parse_item(cls, item: str) -> Iterator[I]:
21 yield item 22 yield item
22 23
23 @property 24 @property
diff --git a/aoc/__main__.py b/aoc/__main__.py
index 596abee..96a9b7f 100644
--- a/aoc/__main__.py
+++ b/aoc/__main__.py
@@ -38,7 +38,7 @@ def run(
38 38
39 Assignment = getattr(assignment_day, f"Assignment{AssignmentPart(part).name}") 39 Assignment = getattr(assignment_day, f"Assignment{AssignmentPart(part).name}")
40 assignment = Assignment( 40 assignment = Assignment(
41 path=os.path.dirname(assignment_day.__file__), **dict(kwargs) 41 path=os.path.dirname(assignment_day.__file__), **dict(kwargs or {})
42 ) 42 )
43 43
44 start = perf_counter() 44 start = perf_counter()