Skip to content

Commit

Permalink
Fix return annotation of main in day01 and day02
Browse files Browse the repository at this point in the history
I've inadvertently left the old annotation of `None` in place after
refactoring the way solutions are run. This commit rectifies that
mistake by changing it to `Tuple[int]`,
  • Loading branch information
SebastiaanZ committed Dec 2, 2019
1 parent 3db5618 commit ab81335
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions solutions/day01/solution.py
@@ -1,5 +1,5 @@
import itertools
from typing import List
from typing import List, Tuple


def _fuel_requirement(mass: int) -> int:
Expand All @@ -24,7 +24,7 @@ def part_two(data: List[int]) -> int:
return sum(sum(itertools.takewhile(lambda fuel: fuel > 0, _module_fuel(mass))) for mass in data)


def main(data: List[str]) -> None:
def main(data: List[str]) -> Tuple[int]:
data = [int(number) for number in data]
answer_one = part_one(data)
answer_two = part_two(data)
Expand Down
4 changes: 2 additions & 2 deletions solutions/day02/solution.py
Expand Up @@ -3,7 +3,7 @@
import itertools
import logging
import operator
from typing import Callable, List
from typing import Callable, List, Tuple

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -47,7 +47,7 @@ def part_two(data: List[int]) -> int:
return 100 * noun + verb


def main(data: List[str]) -> None:
def main(data: List[str]) -> Tuple[int]:
"""The main function taking care of parsing the input data and running the solutions."""
op_codes = data[0].split(",")
data = [int(number) for number in op_codes]
Expand Down

0 comments on commit ab81335

Please sign in to comment.