[ci] auto-format

This commit is contained in:
brostosjoined 2025-01-26 17:40:01 +00:00 committed by github-actions[bot]
parent a62fe55ca8
commit 0db98e8618
3 changed files with 26 additions and 23 deletions

View file

@ -854,8 +854,6 @@ class Discordlogin(PopupWindow):
PresenceUpdate().close() PresenceUpdate().close()
def get_class(): def get_class():
if ANDROID: if ANDROID:
return PresenceUpdate() return PresenceUpdate()
@ -902,7 +900,6 @@ class DiscordRP(babase.Plugin):
self.rpc_thread.rpc.close() self.rpc_thread.rpc.close()
self.rpc_thread.should_close = True self.rpc_thread.should_close = True
def on_app_pause(self) -> None: def on_app_pause(self) -> None:
self.rpc_thread.close() self.rpc_thread.close()

View file

@ -234,9 +234,10 @@ def get_modules() -> None:
with zipfile.ZipFile(package_filename, "r") as zip_ref: with zipfile.ZipFile(package_filename, "r") as zip_ref:
zip_ref.extractall(install_path) zip_ref.extractall(install_path)
try: try:
shutil.rmtree(Path(f"{install_path}/lxml-5.3.0.dist-info")) #! Remember to update accordingly # ! Remember to update accordingly
shutil.rmtree(Path(f"{install_path}/lxml-5.3.0.dist-info"))
except: except:
shutil.rmtree(Path(f"{install_path}/charset_normalizer-3.4.1.dist-info")) #! shutil.rmtree(Path(f"{install_path}/charset_normalizer-3.4.1.dist-info")) # !
remove(package_path) remove(package_path)
else: else:
return return
@ -297,7 +298,10 @@ def play_sound(sound):
with bs.get_foreground_host_activity().context: with bs.get_foreground_host_activity().context:
bs.getsound(sound).play() bs.getsound(sound).play()
accessible_online = None accessible_online = None
@threaded @threaded
def confirm_port(): def confirm_port():
global accessible_online global accessible_online
@ -393,14 +397,14 @@ def add_port_mapping():
NewLeaseDuration=14400, NewLeaseDuration=14400,
) )
babase.pushcall( babase.pushcall(
babase.Call(play_sound, "shieldUp"), babase.Call(play_sound, "shieldUp"),
from_other_thread=True, from_other_thread=True,
) )
except (SOAPError, HTTPError, UnicodeDecodeError): except (SOAPError, HTTPError, UnicodeDecodeError):
babase.screenmessage( babase.screenmessage(
"You will need to manualy port forward at the router :(" "You will need to manualy port forward at the router :("
) )
babase.pushcall(babase.Call(play_sound, "error"),from_other_thread=True,) babase.pushcall(babase.Call(play_sound, "error"), from_other_thread=True,)
except ModuleNotFoundError: except ModuleNotFoundError:
pass pass

View file

@ -8,6 +8,7 @@ import bascenev1 as bs
last_len_msg = 0 # Initialize the global variable outside the function last_len_msg = 0 # Initialize the global variable outside the function
def wave_emote(): def wave_emote():
global last_len_msg # To modify the global variable global last_len_msg # To modify the global variable
@ -46,6 +47,7 @@ def wave_emote():
print(last_len_msg, "last_len_msg") print(last_len_msg, "last_len_msg")
# ba_meta export plugin # ba_meta export plugin
class brostos(babase.Plugin): class brostos(babase.Plugin):
timer = bs.AppTimer(0.5, wave_emote, repeat=True) timer = bs.AppTimer(0.5, wave_emote, repeat=True)