From 5a938d3f44945ae6189179c243823f2e631f0a79 Mon Sep 17 00:00:00 2001 From: Nettika Date: Sat, 9 Dec 2023 18:05:48 -0800 Subject: [PATCH] Sort imports --- 01/__main__.py | 3 ++- 01/puzzle_test.py | 8 ++------ 02/game.py | 3 ++- 02/puzzle_test.py | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/01/__main__.py b/01/__main__.py index 84f0c76..e9419e4 100644 --- a/01/__main__.py +++ b/01/__main__.py @@ -1,6 +1,7 @@ -from puzzle import solve_pt_1, solve_pt_2 from pathlib import Path +from puzzle import solve_pt_1, solve_pt_2 + def main(): input = ( diff --git a/01/puzzle_test.py b/01/puzzle_test.py index 194d7b1..343b724 100644 --- a/01/puzzle_test.py +++ b/01/puzzle_test.py @@ -1,9 +1,5 @@ -from puzzle import ( - pt_1_first_digit_pattern, - pt_1_last_digit_pattern, - solve_pt_1, - solve_pt_2, -) +from puzzle import (pt_1_first_digit_pattern, pt_1_last_digit_pattern, + solve_pt_1, solve_pt_2) def test_solve_pt_1(): diff --git a/02/game.py b/02/game.py index a2d54a8..5866bc7 100644 --- a/02/game.py +++ b/02/game.py @@ -1,6 +1,7 @@ from __future__ import annotations -from dataclasses import dataclass + import re +from dataclasses import dataclass game_id_pattern = re.compile(r"^Game (\d+)$") draw_yield_description_pattern = re.compile(r"(\d+) (\w+)") diff --git a/02/puzzle_test.py b/02/puzzle_test.py index 108b1fe..32eb5cf 100644 --- a/02/puzzle_test.py +++ b/02/puzzle_test.py @@ -1,5 +1,5 @@ from game import Game -from puzzle import solve_pt_1, solve_pt_2, _configuration_power +from puzzle import _configuration_power, solve_pt_1, solve_pt_2 mock_input = [ "Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green",