diff --git a/.github/workflows/black_format.yml b/.github/workflows/black_format.yml index 71f2cd3..6e9cf84 100644 --- a/.github/workflows/black_format.yml +++ b/.github/workflows/black_format.yml @@ -13,6 +13,6 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - - uses: psf/black@24.10.0 + - uses: psf/black@25.1.0 with: options: "--check --verbose" diff --git a/solutions/adv_2024_02.py b/solutions/adv_2024_02.py index 081a676..5fd8203 100644 --- a/solutions/adv_2024_02.py +++ b/solutions/adv_2024_02.py @@ -34,7 +34,7 @@ def is_safe_b(in_list: list[int]) -> bool: def _get_solve( - is_safe: typing.Callable[[list[int]], bool] + is_safe: typing.Callable[[list[int]], bool], ) -> typing.Callable[[str], int]: def _solve(in_str: str) -> int: return _count_safe(_parse_input(in_str), is_safe) diff --git a/solutions/adv_2024_07.py b/solutions/adv_2024_07.py index cea573b..c17f2d7 100644 --- a/solutions/adv_2024_07.py +++ b/solutions/adv_2024_07.py @@ -82,7 +82,7 @@ def _can_be_true(equation: Equation) -> bool: def _get_solve( - can_be_true: typing.Callable[[Equation], bool] + can_be_true: typing.Callable[[Equation], bool], ) -> typing.Callable[[str], int]: def _solve(in_str: str) -> int: return sum(_.result for _ in _parse_input(in_str) if can_be_true(_)) diff --git a/solutions/adv_2024_08.py b/solutions/adv_2024_08.py index 5b51df6..7abcca8 100644 --- a/solutions/adv_2024_08.py +++ b/solutions/adv_2024_08.py @@ -58,7 +58,7 @@ def _get_antinodes_b(pos_a: Pair, pos_b: Pair, limits: Pair) -> PosSet: def _get_all_antinodes( - get_antinodes: typing.Callable[[Pair, Pair, Pair], PosSet] + get_antinodes: typing.Callable[[Pair, Pair, Pair], PosSet], ) -> typing.Callable[[PosSet, Pair], PosSet]: def _all_antinodes(positions: PosSet, limits: Pair) -> PosSet: return { @@ -71,7 +71,7 @@ def _all_antinodes(positions: PosSet, limits: Pair) -> PosSet: def _get_solve( - all_antinodes: typing.Callable[[PosSet, Pair], PosSet] + all_antinodes: typing.Callable[[PosSet, Pair], PosSet], ) -> typing.Callable[[str], int]: def _solve(in_str: str) -> int: data, limits = _parse_input(in_str) diff --git a/solutions/adv_2024_10.py b/solutions/adv_2024_10.py index 7a5b023..8464ff1 100644 --- a/solutions/adv_2024_10.py +++ b/solutions/adv_2024_10.py @@ -73,7 +73,7 @@ def _count_trailheads_b(height_map: HeightMap, start_pos: Pos) -> int: def _get_solve( - count_trailheads: typing.Callable[[HeightMap, Pos], int] + count_trailheads: typing.Callable[[HeightMap, Pos], int], ) -> typing.Callable[[str], int]: def _solve(in_str: str) -> int: height_map, starts = _parse_input(in_str) diff --git a/solutions/adv_2024_14.py b/solutions/adv_2024_14.py index 62d742d..12de9c8 100644 --- a/solutions/adv_2024_14.py +++ b/solutions/adv_2024_14.py @@ -19,7 +19,7 @@ def _parse_input(in_str: str) -> list[tuple[Pair, Pair]]: def _to_positions_and_vels( - data: list[tuple[Pair, Pair]] + data: list[tuple[Pair, Pair]], ) -> tuple[list[Pair], list[Pair]]: positions = [_[0] for _ in data] vels = [_[1] for _ in data] diff --git a/solutions/adv_2024_15.py b/solutions/adv_2024_15.py index e286a3a..7688530 100644 --- a/solutions/adv_2024_15.py +++ b/solutions/adv_2024_15.py @@ -87,7 +87,7 @@ def _move_robot_a(mut_map: Map, robot_pos: Pair, in_dir: Pair) -> Pair: def _get_make_all_moves( - move_robot: typing.Callable[[Map, Pair, Pair], Pair] + move_robot: typing.Callable[[Map, Pair, Pair], Pair], ) -> typing.Callable[[Map, Pair, list[Pair]], None]: def _make_all_moves(mut_map: Map, robot_pos: Pair, moves: list[Pair]) -> None: cur_robot_pos = robot_pos diff --git a/solutions/adv_2024_21.py b/solutions/adv_2024_21.py index 1a926df..e64ea3a 100644 --- a/solutions/adv_2024_21.py +++ b/solutions/adv_2024_21.py @@ -84,7 +84,7 @@ def _append_with_a(seq: set[str]) -> set[str]: def _get_keypad_press_sequence( - keypad_sequences: typing.Callable[[str, str], set[str]] + keypad_sequences: typing.Callable[[str, str], set[str]], ) -> typing.Callable[[str], set[str]]: def _keypad_press_sequence(keys: str) -> set[str]: res = {""}