Skip to content

Commit 1b474f0

Browse files
style: format code with black and isort
1 parent 45303b4 commit 1b474f0

File tree

8 files changed

+68
-10
lines changed

8 files changed

+68
-10
lines changed

main.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -919,17 +919,19 @@ def generate_new_board():
919919
def build_closed_message(parent):
920920
"""
921921
Build a message indicating the game is closed, to be displayed in place of the board.
922-
922+
923923
Args:
924924
parent: The parent UI element to build the message in
925925
"""
926926
with parent:
927927
with ui.element("div").classes(GRID_CONTAINER_CLASS):
928-
with ui.element("div").classes("flex justify-center items-center h-full w-full"):
928+
with ui.element("div").classes(
929+
"flex justify-center items-center h-full w-full"
930+
):
929931
ui.label("GAME CLOSED").classes("text-center fit-header").style(
930932
f"font-family: {HEADER_FONT_FAMILY}; color: {FREE_SPACE_TEXT_COLOR}; font-size: 6rem;"
931933
)
932-
934+
933935
# Run JavaScript to ensure text is resized properly
934936
try:
935937
js_code = """

poetry.lock

Lines changed: 54 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ flake8 = "^7.0.0"
2020
black = "^24.2.0"
2121
isort = "^5.13.2"
2222
python-semantic-release = "^9.1.1"
23+
mypy = "^1.15.0"
2324

2425
[build-system]
2526
requires = ["poetry-core>=1.8"]

src/core/game_logic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
BoardViews,
2727
ClickedTiles,
2828
Coordinate,
29-
TileLabelInfo,
3029
TileButtonsDict,
30+
TileLabelInfo,
3131
)
3232
from src.utils.text_processing import get_line_style_for_lines, split_phrase_into_lines
3333

src/types/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""
22
Type definitions for the Bingo application.
3-
"""
3+
"""

src/types/ui_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
TileInfo = Dict[str, Union[ui.card, List[TileLabelInfo]]]
1919
TileButtonsDict = Dict[Coordinate, TileInfo]
2020
BoardViewTuple = Tuple[ui.element, TileButtonsDict]
21-
BoardViews = Dict[str, BoardViewTuple]
21+
BoardViews = Dict[str, BoardViewTuple]

src/ui/board_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
TILE_UNCLICKED_BG_COLOR,
2626
TILE_UNCLICKED_TEXT_COLOR,
2727
)
28-
from src.types.ui_types import BoardType, Coordinate, ClickedTiles, TileButtonsDict
28+
from src.types.ui_types import BoardType, ClickedTiles, Coordinate, TileButtonsDict
2929
from src.utils.text_processing import get_line_style_for_lines, split_phrase_into_lines
3030

3131

@@ -78,7 +78,7 @@ def build_board(
7878
on_tile_click: Callback function when a tile is clicked
7979
board: 2D array of phrases
8080
clicked_tiles: Set of (row, col) tuples that are clicked
81-
81+
8282
Returns:
8383
The updated tile_buttons_dict with UI elements
8484
"""

tests/test_ui_functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,9 @@ def test_close_game(self, mock_build_closed_message, mock_header_label, mock_ui)
218218

219219
@patch("main.ui.run_javascript")
220220
@patch("main.build_closed_message")
221-
def test_sync_board_state_when_game_closed(self, mock_build_closed_message, mock_run_js):
221+
def test_sync_board_state_when_game_closed(
222+
self, mock_build_closed_message, mock_run_js
223+
):
222224
"""Test sync_board_state behavior when game is closed"""
223225
import main
224226

0 commit comments

Comments
 (0)