diff options
Diffstat (limited to 'aoc/__init__.py')
| -rw-r--r-- | aoc/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/aoc/__init__.py b/aoc/__init__.py index 07a5fe7..b13489c 100644 --- a/aoc/__init__.py +++ b/aoc/__init__.py | |||
| @@ -4,9 +4,13 @@ from typing import Generator, Any, Iterator | |||
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | class BaseAssignment(ABC): | 6 | class BaseAssignment(ABC): |
| 7 | example_result = NotImplemented | ||
| 7 | def __init__(self, path): | 8 | def __init__(self, path): |
| 8 | self.path = path | 9 | self.path = path |
| 9 | 10 | ||
| 11 | def __str__(self): | ||
| 12 | return f'{self.__module__}.{self.__class__.__name__}' | ||
| 13 | |||
| 10 | def parse_item(self, item: str) -> Any: | 14 | def parse_item(self, item: str) -> Any: |
| 11 | return item | 15 | return item |
| 12 | 16 | ||
| @@ -20,4 +24,4 @@ class BaseAssignment(ABC): | |||
| 20 | yield self.parse_item(line.strip()) | 24 | yield self.parse_item(line.strip()) |
| 21 | 25 | ||
| 22 | def run(self, input: Iterator) -> Any: | 26 | def run(self, input: Iterator) -> Any: |
| 23 | raise NotImplementedError('Please implement run') | 27 | raise NotImplementedError('Please implement run') \ No newline at end of file |
