From 9469e9bbaff17ee0f27f03a403e389364a2c244a Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Sat, 4 Dec 2021 13:40:22 +0000 Subject: day 4: more type annotations --- 4.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/4.py b/4.py index f08659b..eeb929e 100644 --- a/4.py +++ b/4.py @@ -10,7 +10,7 @@ class Board: has_bingo: bool unmarked_sum: int nums: set[int] - def __init__(self, cells: list[list[int]]): + def __init__(self, cells: list[list[int]]) -> None: self.width = len(cells[0]) self.height = len(cells) self.col_hits = [0] * self.width @@ -23,7 +23,7 @@ class Board: self.cells.append(cell) self.nums.add(cell) self.has_bingo = False - def call(self, num: int): + def call(self, num: int) -> None: if num not in self.nums: return pos: int = self.cells.index(num) self.col_hits[pos // self.width] += 1 -- cgit v1.2.3-54-g00ecf