-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.py
More file actions
47 lines (33 loc) · 881 Bytes
/
template.py
File metadata and controls
47 lines (33 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from __future__ import annotations
import typing as typ
T = typ.TypeVar('T', covariant=True)
class Day(typ.Protocol, typ.Generic[T]):
def __init__(self, parse_input: T, debug: bool = False) -> None:
...
@staticmethod
def parse_input(input: list[str]) -> T:
...
def solve1(self) -> int:
...
def solve2(self) -> int:
...
'''
from __future__ import annotations
import typing as typ
import tools as tl
SAMPLE: list[str] | None = []
ADDITIONAL_SAMPLES: list[list[str]] = []
T_DATA: typ.TypeAlias = None # TODO
class Day:
@staticmethod
def parse_input(input: list[str]) -> T_DATA:
...
def __init__(self, data: T_DATA, debug: bool = False) -> None:
self.data = data
self.debug = debug
...
def solve1(self) -> int:
...
def solve2(self) -> int:
...
'''