[ci] auto-format

This commit is contained in:
brostosjoined 2023-07-16 20:58:09 +00:00 committed by github-actions[bot]
parent b2d010ce10
commit 538f266096

View file

@ -223,7 +223,6 @@ if not ANDROID:
shutil.rmtree(Path(f"{getcwd()}/ba_data/python/pypresence")) shutil.rmtree(Path(f"{getcwd()}/ba_data/python/pypresence"))
get_module() get_module()
from pypresence.utils import get_event_loop from pypresence.utils import get_event_loop
import pypresence import pypresence
import socket import socket
@ -369,7 +368,6 @@ if not ANDROID:
# except Exception: # except Exception:
# print_error("failed to update presence", include_exception= True) # print_error("failed to update presence", include_exception= True)
def _reconnect(self) -> None: def _reconnect(self) -> None:
self.rpc.connect() self.rpc.connect()
self._subscribe_events() self._subscribe_events()
@ -475,9 +473,6 @@ class Discordlogin(PopupWindow):
log_btn_colour = (0.10, 0.95, 0.10) if not self.path.exists() else (1.00, 0.15, 0.15) log_btn_colour = (0.10, 0.95, 0.10) if not self.path.exists() else (1.00, 0.15, 0.15)
log_txt = "LOG IN" if not self.path.exists() else "LOG OUT" log_txt = "LOG IN" if not self.path.exists() else "LOG OUT"
# creates our _root_widget # creates our _root_widget
PopupWindow.__init__(self, PopupWindow.__init__(self,
position=(0.0, 0.0), position=(0.0, 0.0),
@ -486,7 +481,6 @@ class Discordlogin(PopupWindow):
if _uiscale is babase.UIScale.MEDIUM else 1.0), if _uiscale is babase.UIScale.MEDIUM else 1.0),
bg_color=bg_color) bg_color=bg_color)
self._cancel_button = bui.buttonwidget( self._cancel_button = bui.buttonwidget(
parent=self.root_widget, parent=self.root_widget,
position=(25, self._height - 40), position=(25, self._height - 40),
@ -499,16 +493,12 @@ class Discordlogin(PopupWindow):
icon=bui.gettexture('crossOut'), icon=bui.gettexture('crossOut'),
iconscale=1.2) iconscale=1.2)
bui.imagewidget(parent=self.root_widget, bui.imagewidget(parent=self.root_widget,
position=(180, self._height - 55), position=(180, self._height - 55),
size=(32 * s, 32 * s), size=(32 * s, 32 * s),
texture=bui.gettexture("discordLogo"), texture=bui.gettexture("discordLogo"),
color=(10 - 0.32, 10 - 0.39, 10 - 0.96)) color=(10 - 0.32, 10 - 0.39, 10 - 0.96))
self.email_widget = bui.textwidget(parent=self.root_widget, self.email_widget = bui.textwidget(parent=self.root_widget,
text="Email/Phone Number", text="Email/Phone Number",
size=(400, 70), size=(400, 70),
@ -520,7 +510,6 @@ class Discordlogin(PopupWindow):
autoselect=True, autoselect=True,
maxwidth=220) maxwidth=220)
self.password_widget = bui.textwidget(parent=self.root_widget, self.password_widget = bui.textwidget(parent=self.root_widget,
text="Password", text="Password",
size=(400, 70), size=(400, 70),
@ -532,7 +521,6 @@ class Discordlogin(PopupWindow):
autoselect=True, autoselect=True,
maxwidth=220) maxwidth=220)
bui.containerwidget(edit=self.root_widget, bui.containerwidget(edit=self.root_widget,
cancel_button=self._cancel_button) cancel_button=self._cancel_button)
@ -558,7 +546,6 @@ class Discordlogin(PopupWindow):
maxwidth=200, maxwidth=200,
color=(1.00, 0.15, 0.15)) color=(1.00, 0.15, 0.15))
self._login_button = bui.buttonwidget( self._login_button = bui.buttonwidget(
parent=self.root_widget, parent=self.root_widget,
position=(120, 65), position=(120, 65),
@ -625,6 +612,8 @@ class Discordlogin(PopupWindow):
run_once = False run_once = False
def get_once_asset(): def get_once_asset():
global run_once global run_once
if run_once: if run_once:
@ -652,6 +641,7 @@ def get_once_asset():
pass pass
run_once = True run_once = True
def get_class(): def get_class():
if ANDROID: if ANDROID:
return PresenceUpdate() return PresenceUpdate()
@ -870,4 +860,3 @@ class DiscordRP(babase.Plugin):
) )
if ANDROID and Path(f"{getcwd()}/token.txt").exists(): if ANDROID and Path(f"{getcwd()}/token.txt").exists():
self.rpc_thread.presence() self.rpc_thread.presence()