diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2021-12-04 13:40:22 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2021-12-04 13:40:22 +0000 |
commit | 9469e9bbaff17ee0f27f03a403e389364a2c244a (patch) | |
tree | 599bdfd6f985438dbb756b65337f0115714938be | |
parent | 9de28ee17932d949a12381bf5a8de95b5ea7332b (diff) | |
download | aoc2021-9469e9bbaff17ee0f27f03a403e389364a2c244a.tar.gz aoc2021-9469e9bbaff17ee0f27f03a403e389364a2c244a.tar.xz aoc2021-9469e9bbaff17ee0f27f03a403e389364a2c244a.zip |
day 4: more type annotations
-rw-r--r-- | 4.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |