diff options
author | Thomas Voss <thomasvoss@live.com> | 2021-12-12 06:59:53 +0100 |
---|---|---|
committer | Thomas Voss <thomasvoss@live.com> | 2021-12-12 06:59:53 +0100 |
commit | 1b70f3065663023b5a76c64b2b460a9231c64ecd (patch) | |
tree | 0f40634235b7312a08c5a80e7f1fb746e98f254c /2021/12/puzzles.py | |
parent | 2123df38d2bb5745fdae0e226a02c4759dc22b46 (diff) |
Fix defaultdict typehints
Diffstat (limited to '2021/12/puzzles.py')
-rw-r--r-- | 2021/12/puzzles.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/2021/12/puzzles.py b/2021/12/puzzles.py index 2194c49..a395f5c 100644 --- a/2021/12/puzzles.py +++ b/2021/12/puzzles.py @@ -3,7 +3,7 @@ from collections import defaultdict -def solve(paths: defaultdict[list[str]], path: str, flag: bool = False) -> int: +def solve(paths: defaultdict[str, list[str]], path: str, flag: bool = False) -> int: acc = 0 tokens = path.split(",") @@ -27,7 +27,7 @@ def solve(paths: defaultdict[list[str]], path: str, flag: bool = False) -> int: def main() -> None: - paths: defaultdict[list[str]] = defaultdict(list) + paths: defaultdict[str, list[str]] = defaultdict(list) with open("input", "r", encoding="utf-8") as f: for entry in f.readlines(): x, y = entry.strip().split("-") |