change lists to tuples

This commit is contained in:
alfrix 2024-01-15 14:44:50 -03:00
parent 81e76b1815
commit 2956658104
3 changed files with 4 additions and 4 deletions

View File

@ -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()

View File

@ -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})

View File

@ -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()