aboutsummaryrefslogtreecommitdiff
path: root/2021
diff options
context:
space:
mode:
authorThomas Voss <thomasvoss@live.com> 2021-12-19 02:36:12 +0100
committerThomas Voss <thomasvoss@live.com> 2021-12-19 02:36:12 +0100
commit4788c4b349f2752797487f8bc0a9ed4ff384b99c (patch)
tree9f8fa76493d6bee32ff85451ec223719445f2baf /2021
parent8e265a66fed0f2e79f0856e1ad59c64f3f210ab3 (diff)
Do typehints the correct way
Diffstat (limited to '2021')
-rw-r--r--2021/16/puzzles.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/2021/16/puzzles.py b/2021/16/puzzles.py
index 7d47814..946df31 100644
--- a/2021/16/puzzles.py
+++ b/2021/16/puzzles.py
@@ -7,14 +7,10 @@ data: str
class Packet(NamedTuple):
- pass
-
-
-class Packet(NamedTuple):
version: int
type: int
value: int
- subpackets: list[Packet]
+ subpackets: list['Packet']
def calculate(self) -> int:
f = lambda p: p.calculate()