mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
[ci] auto-format
This commit is contained in:
parent
f213f2429b
commit
2454845a38
1 changed files with 9 additions and 7 deletions
|
|
@ -6,7 +6,7 @@ import _ba
|
|||
import ba
|
||||
import ba.internal
|
||||
import random
|
||||
from bastd.ui.gather.publictab import PublicGatherTab, PartyEntry,PingThread
|
||||
from bastd.ui.gather.publictab import PublicGatherTab, PartyEntry, PingThread
|
||||
if TYPE_CHECKING:
|
||||
from typing import Callable
|
||||
|
||||
|
|
@ -31,8 +31,10 @@ def override(cls: ClassType) -> Callable[[MethodType], MethodType]:
|
|||
# And anyways, why not just GatherPublicTab = NewGatherPublicTab?
|
||||
# But hmm, if we imagine someone used `from blah.blah import Blah`, using
|
||||
# `blah.Blah = NewBlah` AFTERWARDS would be meaningless.
|
||||
class NewPublicGatherTab(PublicGatherTab,PingThread):
|
||||
|
||||
|
||||
|
||||
class NewPublicGatherTab(PublicGatherTab, PingThread):
|
||||
|
||||
@override(PublicGatherTab)
|
||||
def _build_join_tab(self, region_width: float,
|
||||
region_height: float,
|
||||
|
|
@ -87,13 +89,13 @@ class NewPublicGatherTab(PublicGatherTab,PingThread):
|
|||
|
||||
@override(PublicGatherTab)
|
||||
def _join_random_server(self) -> None:
|
||||
name_prefixes = set()
|
||||
name_prefixes = set()
|
||||
parties = [p for p in self._get_parties_list() if
|
||||
(p.size >= randomjoin.minimum_players
|
||||
and p.size < p.size_max and (randomjoin.maximum_ping == 9999
|
||||
or (p.ping is not None
|
||||
and p.ping <= randomjoin.maximum_ping)))]
|
||||
|
||||
or (p.ping is not None
|
||||
and p.ping <= randomjoin.maximum_ping)))]
|
||||
|
||||
if not parties:
|
||||
ba.screenmessage('No suitable servers found; wait',
|
||||
color=(1, 0, 0))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue