Skip to content

Commit 5f79cdf

Browse files
committed
Fix type things
1 parent a6debd9 commit 5f79cdf

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

rlbot/interface.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def run(self, *, background_thread: bool = False):
245245
self._running = self.handle_incoming_messages(blocking=True)
246246
self._running = False
247247

248-
def handle_incoming_messages(self, blocking=False) -> bool:
248+
def handle_incoming_messages(self, blocking: bool = False) -> bool:
249249
"""
250250
Empties queue of incoming messages (should be called regularly, see `run`).
251251
Optionally blocking, ensuring that at least one message will be handled.
@@ -324,6 +324,8 @@ def handle_incoming_message(self, incoming_message: SocketMessage):
324324
)
325325
for handler in self.controllable_team_info_handlers:
326326
handler(player_mappings)
327+
case _:
328+
pass
327329

328330
return True
329331

rlbot/managers/match.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def set_game_state(
282282
game_state = fill_desired_game_state(balls, cars, game_info, commands)
283283
self.rlbot_interface.send_game_state(game_state)
284284

285-
def shut_down(self, use_force_if_necessary=True):
285+
def shut_down(self, use_force_if_necessary: bool = True):
286286
"""
287287
Shutdown the RLBotServer process.
288288
"""

rlbot/managers/script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def initialize(self):
225225
def retire(self):
226226
"""Called when the script is shut down"""
227227

228-
def handle_packet(self, packet: flat.GamePacket):
228+
def handle_packet(self, packet: flat.GamePacket) -> None:
229229
"""
230230
This method is where the main logic of the bot goes.
231231
The input is the latest game packet.

rlbot/utils/gateway.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def find_main_executable_path(
2828
return main_executable_path, None
2929

3030

31-
def is_port_accessible(port):
31+
def is_port_accessible(port: int):
3232
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
3333
try:
3434
sock.bind(("127.0.0.1", port))

0 commit comments

Comments
 (0)