change lists to tuples
This commit is contained in:
parent
81e76b1815
commit
2956658104
@ -273,7 +273,7 @@ class Panel(MenuPanel):
|
||||
|
||||
if "keypad" not in self.labels:
|
||||
self.labels["keypad"] = Keypad(self._screen, self.change_target_temp, self.pid_calibrate, self.hide_numpad)
|
||||
can_pid = self._printer.state not in ["printing", "paused"] \
|
||||
can_pid = self._printer.state not in ("printing", "paused") \
|
||||
and self._screen.printer.config[self.active_heater]['control'] == 'pid'
|
||||
self.labels["keypad"].show_pid(can_pid)
|
||||
self.labels["keypad"].clear()
|
||||
|
@ -98,7 +98,7 @@ class Panel(ScreenPanel):
|
||||
self.scroll.show_all()
|
||||
|
||||
def restart(self, widget, program):
|
||||
if self._printer.state in ["printing", "paused"]:
|
||||
if self._printer.state in ("printing", "paused"):
|
||||
self._screen._confirm_send_action(widget, f'{_("Are you sure?")}\n\n'
|
||||
f'{_("Restart")}: {program}',
|
||||
"machine.services.restart", {"service": program})
|
||||
|
@ -29,7 +29,7 @@ class Panel(ScreenPanel):
|
||||
|
||||
# When printing start in temp_delta mode and only select tools
|
||||
selection = []
|
||||
if self._printer.state not in ["printing", "paused"]:
|
||||
if self._printer.state not in ("printing", "paused"):
|
||||
self.show_preheat = True
|
||||
selection.extend(self._printer.get_temp_devices())
|
||||
elif extra:
|
||||
@ -523,7 +523,7 @@ class Panel(ScreenPanel):
|
||||
|
||||
if "keypad" not in self.labels:
|
||||
self.labels["keypad"] = Keypad(self._screen, self.change_target_temp, self.pid_calibrate, self.hide_numpad)
|
||||
can_pid = self._printer.state not in ["printing", "paused"] \
|
||||
can_pid = self._printer.state not in ("printing", "paused") \
|
||||
and self._screen.printer.config[self.active_heater]['control'] == 'pid'
|
||||
self.labels["keypad"].show_pid(can_pid)
|
||||
self.labels["keypad"].clear()
|
||||
|
Loading…
x
Reference in New Issue
Block a user