Skip to content

Commit

Permalink
Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
avanwinkle committed Sep 1, 2024
1 parent 6bca1af commit f73e649
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion mpf/modes/high_score/code/high_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ async def _run(self) -> None:
# ask player for initials if we do not know them
if not player.initials:
try:
player.initials = await self._ask_player_for_initials(player, award_names[i], value, category_name)
player.initials = await self._ask_player_for_initials(player, award_names[i],
value, category_name)
except asyncio.TimeoutError:
del new_list[i]
# no entry when the player missed the timeout
Expand Down
3 changes: 2 additions & 1 deletion mpf/platforms/fast/fast_exp_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import asyncio
from base64 import b16decode
from binascii import Error as binasciiError
from importlib import import_module

from packaging import version
Expand Down Expand Up @@ -176,7 +177,7 @@ def update_leds(self):

try:
self.communicator.send_bytes(b16decode(f'{msg_header}{msg}'), log_msg)
except Exception as e:
except binasciiError as e:
self.log.error(
f"Error decoding the following message for board {breakout_address} : {msg_header}{msg}")
self.log.info("Attempted update that caused this error: %s", dirty_leds)
Expand Down
2 changes: 1 addition & 1 deletion mpf/plugins/platform_integration_test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ async def move_ball_from_drain_to_trough(self, **kwargs):
drain_switches = self.machine.ball_devices.items_tagged('drain')[0].config.get('ball_switches')
self.info_log("Found drain switches: %s of type %s", drain_switches, type(drain_switches))
# If there's only one drain switch it might be a single value, rather than a list
drain_switch = drain_switches if type(drain_switches) is str else drain_switches[-1]
drain_switch = drain_switches if isinstance(drain_switches, str) else drain_switches[-1]
self.info_log("Setting drain switch '%s' to zero", drain_switch)
self.set_switch_sync(drain_switch, 0)
await asyncio.sleep(0.25)
Expand Down

0 comments on commit f73e649

Please sign in to comment.