[ci] auto-format

This commit is contained in:
im-yellow 2025-05-21 23:10:54 +00:00 committed by github-actions[bot]
parent 0ed4872ed2
commit f643c74d21

View file

@ -17,6 +17,7 @@ only_empty = False
ClassType = TypeVar('ClassType') ClassType = TypeVar('ClassType')
MethodType = TypeVar('MethodType') MethodType = TypeVar('MethodType')
def override(cls: ClassType) -> Callable[[MethodType], MethodType]: def override(cls: ClassType) -> Callable[[MethodType], MethodType]:
def decorator(new_method: MethodType) -> MethodType: def decorator(new_method: MethodType) -> MethodType:
method_name = new_method.__code__.co_name method_name = new_method.__code__.co_name
@ -27,6 +28,8 @@ def override(cls: ClassType) -> Callable[[MethodType], MethodType]:
return decorator return decorator
# Enhanced Gather Tab # Enhanced Gather Tab
class EnhancedPublicGatherTab(PublicGatherTab): class EnhancedPublicGatherTab(PublicGatherTab):
@override(PublicGatherTab) @override(PublicGatherTab)
def _build_join_tab(self, width: float, height: float) -> None: def _build_join_tab(self, width: float, height: float) -> None:
@ -130,7 +133,8 @@ class EnhancedPublicGatherTab(PublicGatherTab):
def _toggle_refresh(self, _=None) -> None: def _toggle_refresh(self, _=None) -> None:
global is_refreshing global is_refreshing
is_refreshing = not is_refreshing is_refreshing = not is_refreshing
bui.screenmessage(f"Refreshing {'Enabled' if is_refreshing else 'Disabled'}", color=(1, 1, 0)) bui.screenmessage(
f"Refreshing {'Enabled' if is_refreshing else 'Disabled'}", color=(1, 1, 0))
@override(PublicGatherTab) @override(PublicGatherTab)
def _toggle_full(self, _=None) -> None: def _toggle_full(self, _=None) -> None:
@ -156,7 +160,8 @@ class EnhancedPublicGatherTab(PublicGatherTab):
only_empty = not only_empty only_empty = not only_empty
if only_empty: if only_empty:
hide_empty = False hide_empty = False
bui.screenmessage(f"{'Showing Only Empty' if only_empty else 'Showing All'} Parties", color=(1, 1, 0)) bui.screenmessage(
f"{'Showing Only Empty' if only_empty else 'Showing All'} Parties", color=(1, 1, 0))
if only_empty: if only_empty:
bui.checkboxwidget(edit=self._empty_checkbox, value=hide_empty) bui.checkboxwidget(edit=self._empty_checkbox, value=hide_empty)
self._update_party_rows() self._update_party_rows()