Skip to content

Commit

Permalink
Black
Browse files Browse the repository at this point in the history
  • Loading branch information
olijeffers0n committed Jul 12, 2024
1 parent 6a75f8d commit 76f813d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions rustplus/remote/websocket/ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ class RustWebsocket:
RESPONSE_TIMEOUT = 5

def __init__(
self,
server_details: ServerDetails,
command_options: Union[CommandOptions, None],
use_fp_proxy: bool,
use_test_server: bool,
debug: bool,
self,
server_details: ServerDetails,
command_options: Union[CommandOptions, None],
use_fp_proxy: bool,
use_test_server: bool,
debug: bool,
) -> None:
self.server_details: ServerDetails = server_details
self.command_options: Union[CommandOptions, None] = command_options
Expand Down Expand Up @@ -125,7 +125,7 @@ async def send_and_get(self, request: AppRequest) -> AppMessage:
return await self.get_response(request.seq)

async def send_message(
self, request: AppRequest, ignore_response: bool = False
self, request: AppRequest, ignore_response: bool = False
) -> None:
if self.connection is None:
raise ClientNotConnectedError("No Current Websocket Connection")
Expand Down Expand Up @@ -170,7 +170,7 @@ async def handle_message(self, app_message: AppMessage) -> None:
message = RustChatMessage(app_message.broadcast.team_message.message)

parts = shlex.split(message.message)
command = parts[0][len(prefix):]
command = parts[0][len(prefix) :]

data = ChatCommand.REGISTERED_COMMANDS[self.server_details].get(
command, None
Expand Down Expand Up @@ -269,7 +269,7 @@ def get_prefix(self, message: str) -> Optional[str]:

@staticmethod
async def run_proto_event(
data: Union[str, bytes], server_details: ServerDetails
data: Union[str, bytes], server_details: ServerDetails
) -> None:
handlers: Set[RegisteredListener] = (
ProtobufEventPayload.HANDLER_LIST.get_handlers(server_details)
Expand Down
6 changes: 3 additions & 3 deletions rustplus/rust_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
AppSetEntityValue,
AppPromoteToLeader,
AppCameraSubscribe,
AppMapMonument, AppFlag,
AppMapMonument,
AppFlag,
)
from .remote.websocket import RustWebsocket
from .structs import (
Expand Down Expand Up @@ -197,8 +198,7 @@ async def get_team_chat(self) -> Union[List[RustChatMessage], None]:
return None

return [
RustChatMessage(message)
for message in response.response.team_chat.messages
RustChatMessage(message) for message in response.response.team_chat.messages
]

async def get_team_info(self) -> Union[RustTeamInfo, None]:
Expand Down

0 comments on commit 76f813d

Please sign in to comment.