From 4788c4b349f2752797487f8bc0a9ed4ff384b99c Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 19 Dec 2021 02:36:12 +0100 Subject: Do typehints the correct way --- 2021/16/puzzles.py | 6 +----- 1 file changed, 1 insertion(+), 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 @@ -6,15 +6,11 @@ from typing import NamedTuple 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() -- cgit v1.2.3