Skip to content

Commit 1ede5a3

Browse files
committed
Merge branch 'dev' into 080-backport-dev
2 parents 8bb26ba + 6441ddb commit 1ede5a3

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

.prospector.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pylint:
2323
disable:
2424
- pointless-string-statement # pointless statement, which is how our event docstrings are seen
2525
- too-few-public-methods
26+
- too-many-positional-arguments # many methods have many positional args
2627
- unsubscriptable-object # broken on python 3.9
2728
# The following linter rules are disabled to make a refactor managable in chunks
2829
- consider-using-f-string # temporarily disabling due to the 900+ instances to be replaced

mpf/devices/timer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ def can_exist_outside_of_game(self):
144144
def _setup_control_events(self, event_list):
145145
self.debug_log("Setting up control events")
146146

147-
kwargs = {}
148147
for entry in event_list:
148+
kwargs = {}
149149
if entry['action'] in ('add', 'subtract', 'jump', 'pause', 'set_tick_interval'):
150150
handler = getattr(self, entry['action'])
151151
kwargs = {'timer_value': entry['value']}

mpf/modes/service/code/service.py

+1
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@ def _generate_light_chains(self): # pylint: disable=too-many-locals
560560
return
561561

562562
items.sort(key=lambda x: x.chain)
563+
return items
563564

564565
async def _volume_menu(self, platform=None):
565566
position = 0

mpf/tests/machine_files/timer/modes/mode_with_timers/config/mode_with_timers.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ timers:
5151
tick_interval: 1s
5252
start_running: no
5353
control_events:
54+
# Keep this event before the reset event to catch
55+
# a regression about the order of timer events
56+
- event: jump_timer_up
57+
action: jump
58+
value: 5
5459
- event: start_timer_up
5560
action: start
5661
- event: reset_timer_up
@@ -59,9 +64,6 @@ timers:
5964
action: stop
6065
- event: restart_timer_up
6166
action: restart
62-
- event: jump_timer_up
63-
action: jump
64-
value: 5
6567
- event: jump_over_max_timer_up
6668
action: jump
6769
value: 20

0 commit comments

Comments
 (0)