Skip to content

Commit a98874c

Browse files
committed
Format
1 parent 9336371 commit a98874c

23 files changed

Lines changed: 227 additions & 230 deletions

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
matrix:
2020
python: [ 3.9, '3.10', '3.11', '3.12', '3.13' ]
2121
with:
22+
engine: pytest
2223
env-vars: |
2324
SDL_AUDIODRIVER=dummy
2425
SDL_VIDEODRIVER=dummy
2526
install-extras: test
2627
os: ubuntu-latest
2728
python-version: ${{ matrix.python }}
28-
engine: pytest
2929

3030
codeql:
3131
uses: ppizarror/workflow-actions/.github/workflows/codeql.yml@master

pygame_menu/_decorator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ class Decorator(Base):
9797
def __init__(
9898
self,
9999
obj: pygame_menu.widgets.Widget
100-
| pygame_menu._scrollarea.ScrollArea
101-
| pygame_menu.Menu,
100+
| pygame_menu._scrollarea.ScrollArea
101+
| pygame_menu.Menu,
102102
decorator_id: str = "",
103103
verbose: bool = True,
104104
) -> None:
@@ -1129,7 +1129,7 @@ def _update_pos_list(
11291129
rect: pygame.Rect,
11301130
decoid: str,
11311131
pos: Tuple2NumberType
1132-
| tuple[Tuple2NumberType, ...], # only (x, y) or ((x1,y1), ...
1132+
| tuple[Tuple2NumberType, ...], # only (x, y) or ((x1,y1), ...
11331133
use_center_positioning=True,
11341134
) -> tuple[Tuple2IntType, ...] | Tuple2IntType:
11351135
"""

pygame_menu/_widgetmanager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ def _append_widget(self, widget: Widget) -> None:
395395
try:
396396
self._menu._render()
397397
except (
398-
pygame_menu.menu._MenuSizingException,
399-
pygame_menu.menu._MenuWidgetOverflow,
398+
pygame_menu.menu._MenuSizingException,
399+
pygame_menu.menu._MenuWidgetOverflow,
400400
):
401401
self._menu.remove_widget(widget)
402402
raise

pygame_menu/examples/other/calculator.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -142,21 +142,21 @@ def __init__(self) -> None:
142142

143143
# Add decorator for each object
144144
for widget in (
145-
b1,
146-
b2,
147-
b3,
148-
b4,
149-
b5,
150-
b6,
151-
b7,
152-
b8,
153-
b9,
154-
b0,
155-
beq,
156-
b_plus,
157-
b_minus,
158-
b_times,
159-
b_div,
145+
b1,
146+
b2,
147+
b3,
148+
b4,
149+
b5,
150+
b6,
151+
b7,
152+
b8,
153+
b9,
154+
b0,
155+
beq,
156+
b_plus,
157+
b_minus,
158+
b_times,
159+
b_div,
160160
):
161161
w_deco = widget.get_decorator()
162162
if widget != beq:

pygame_menu/examples/other/maze.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,8 @@ def _clear_maze(self) -> None:
575575
for row in range(self._rows):
576576
for column in range(self._rows):
577577
if (row, column) != self._start_point and (
578-
row,
579-
column,
578+
row,
579+
column,
580580
) != self._end_point:
581581
self._grid[row][column].update(
582582
nodetype="blank", is_visited=False, is_path=False
@@ -1260,7 +1260,7 @@ def _dijkstra(
12601260
_, current_distance, current_node = queue.pop()
12611261

12621262
v_distances[goal_node] = current_distance + (
1263-
1 if not self._diagonals else 2**0.5
1263+
1 if not self._diagonals else 2 ** 0.5
12641264
)
12651265
visited_nodes.add(goal_node)
12661266

@@ -1317,8 +1317,8 @@ def _neighbours_loop(
13171317
)
13181318
elif ntype == "x":
13191319
queue.push(
1320-
current_distance + ((2**0.5) * modifier) + heuristic,
1321-
current_distance + ((2**0.5) * modifier),
1320+
current_distance + ((2 ** 0.5) * modifier) + heuristic,
1321+
current_distance + ((2 ** 0.5) * modifier),
13221322
neighbour,
13231323
)
13241324

pygame_menu/menu.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,15 @@ def __init__(
243243
mouse_visible: bool = True,
244244
mouse_visible_update: bool = True,
245245
onclose: _events.MenuAction
246-
| Callable[[Menu], Any]
247-
| CallableNoArgsType
248-
| None = None,
246+
| Callable[[Menu], Any]
247+
| CallableNoArgsType
248+
| None = None,
249249
onreset: Callable[[Menu], Any] | CallableNoArgsType | None = None,
250250
overflow: Vector2BoolType | bool = (True, True),
251251
position: Vector2NumberType | tuple[NumberType, NumberType, bool] = (
252-
50,
253-
50,
254-
True,
252+
50,
253+
50,
254+
True,
255255
),
256256
remember_selection: bool = False,
257257
rows: MenuRowsType = None,

pygame_menu/sound.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class Sound(Base):
151151
def __init__(
152152
self,
153153
allowedchanges: int = AUDIO_ALLOW_CHANNELS_CHANGE
154-
| AUDIO_ALLOW_FREQUENCY_CHANGE,
154+
| AUDIO_ALLOW_FREQUENCY_CHANGE,
155155
buffer: int = 4096,
156156
channels: int = 2,
157157
devicename: str = "",

pygame_menu/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ def _create_single_corner_and_edge(
946946
)
947947
edge_shadow_fade_height = edge_rect.width
948948

949-
alpha_increment = 20.0 / (shadow_width_param**1.5)
949+
alpha_increment = 20.0 / (shadow_width_param ** 1.5)
950950
shadow_alpha = alpha_increment
951951
r, g, b = color
952952
for _ in range(shadow_width_param):

pygame_menu/widgets/core/widget.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -769,8 +769,8 @@ def _check_mouseover(
769769
:return: ``True`` if the mouseover status changed
770770
"""
771771
if not hasattr(event, "type") or event.type not in (
772-
pygame.MOUSEMOTION,
773-
pygame.ACTIVEEVENT,
772+
pygame.MOUSEMOTION,
773+
pygame.ACTIVEEVENT,
774774
):
775775
return False
776776

pygame_menu/widgets/selection/left_arrow.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
__all__ = ["LeftArrowSelection"]
1212

13-
1413
from typing import TYPE_CHECKING
1514

1615
from pygame_menu._types import NumberInstance, NumberType, Tuple2IntType

0 commit comments

Comments
 (0)