[ci] auto-format

This commit is contained in:
imayushsaini 2022-12-18 11:24:08 +00:00 committed by github-actions[bot]
parent 90572f7b5d
commit f86623a09a
2 changed files with 60 additions and 55 deletions

View file

@ -2175,6 +2175,8 @@ class CustomAccountViewerWindow(viewer.AccountViewerWindow):
ba.print_exception('Error displaying account info.') ba.print_exception('Error displaying account info.')
# ba_meta export plugin # ba_meta export plugin
class bySmoothy(ba.Plugin): class bySmoothy(ba.Plugin):
def __init__(self): def __init__(self):
if _ba.env().get("build_number", 0) >= 20577: if _ba.env().get("build_number", 0) >= 20577:

View file

@ -63,6 +63,7 @@ https://ballistica.net/discord
""" """
BCSURL = 'https://bcsserver.bombsquad.ga/bannedservers' BCSURL = 'https://bcsserver.bombsquad.ga/bannedservers'
def is_game_version_lower_than(version): def is_game_version_lower_than(version):
""" """
Returns a boolean value indicating whether the current game Returns a boolean value indicating whether the current game
@ -79,6 +80,7 @@ if is_game_version_lower_than("1.7.7"):
else: else:
ba_internal = ba.internal ba_internal = ba.internal
def updateBannedServersCache(): def updateBannedServersCache():
response = None response = None
config = ba.app.config config = ba.app.config
@ -512,7 +514,7 @@ def _update_party_lists(self) -> None:
return return
starttime = time.time() starttime = time.time()
config = ba.app.config config = ba.app.config
bannedservers = config.get('Banned Servers',[]) bannedservers = config.get('Banned Servers', [])
assert len(self._parties_sorted) == len(self._parties) assert len(self._parties_sorted) == len(self._parties)
self._parties_sorted.sort( self._parties_sorted.sort(
@ -564,6 +566,7 @@ def _update_party_lists(self) -> None:
f' {time.time()-starttime:.5f}s.' f' {time.time()-starttime:.5f}s.'
) )
def replace(): def replace():
manualtab.ManualGatherTab._build_favorites_tab = new_build_favorites_tab manualtab.ManualGatherTab._build_favorites_tab = new_build_favorites_tab
manualtab.ManualGatherTab._on_favorites_connect_press = new_on_favorites_connect_press manualtab.ManualGatherTab._on_favorites_connect_press = new_on_favorites_connect_press
@ -697,5 +700,5 @@ class InitalRun(ba.Plugin):
def __init__(self): def __init__(self):
replace() replace()
config = ba.app.config config = ba.app.config
if config["launchCount"]% 5 ==0: if config["launchCount"] % 5 == 0:
updateBannedServersCache() updateBannedServersCache()