Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update psf/black action to v25 #113

Merged
merged 2 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/black_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion solutions/adv_2024_02.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion solutions/adv_2024_07.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(_))
Expand Down
4 changes: 2 additions & 2 deletions solutions/adv_2024_08.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion solutions/adv_2024_10.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion solutions/adv_2024_14.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion solutions/adv_2024_15.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion solutions/adv_2024_21.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {""}
Expand Down