diff --git a/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerJob.py b/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerJob.py index 41cc2358c1..ee5eaac25b 100644 --- a/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerJob.py +++ b/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerJob.py @@ -38,7 +38,7 @@ class FirmwareUpdateCheckerJob(Job): result = self.STRING_ZERO_VERSION try: - request = urllib.request.Request(url, headers=self._headers) + request = urllib.request.Request(url, headers = self._headers) response = urllib.request.urlopen(request) result = response.read().decode("utf-8") except URLError: @@ -100,8 +100,8 @@ class FirmwareUpdateCheckerJob(Job): message = Message(i18n_catalog.i18nc( "@info Don't translate {machine_name}, since it gets replaced by a printer name!", "New features are available for your {machine_name}! It is recommended to update the firmware on your printer.").format( - machine_name=machine_name), - title=i18n_catalog.i18nc( + machine_name = machine_name), + title = i18n_catalog.i18nc( "@info:title The %s gets replaced with the printer name.", "New %s firmware available") % machine_name) @@ -109,8 +109,8 @@ class FirmwareUpdateCheckerJob(Job): i18n_catalog.i18nc("@action:button", "How to update"), "[no_icon]", "[no_description]", - button_style=Message.ActionButtonStyle.LINK, - button_align=Message.ActionButtonStyle.BUTTON_ALIGN_LEFT) + button_style = Message.ActionButtonStyle.LINK, + button_align = Message.ActionButtonStyle.BUTTON_ALIGN_LEFT) message.actionTriggered.connect(self._callback) message.show() diff --git a/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerLookup.py b/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerLookup.py index ec8e7cc073..e283d58b2b 100644 --- a/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerLookup.py +++ b/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerLookup.py @@ -26,8 +26,7 @@ class FirmwareUpdateCheckerLookup: def __init__(self, json_path) -> None: # Open the .json file with the needed lookup-lists for each machine(/model) and retrieve "raw" json. - machines_json = None - with open(json_path, "r", encoding="utf-8") as json_file: + with open(json_path, "r", encoding = "utf-8") as json_file: machines_json = json.load(json_file).get("machines") if machines_json is None: Logger.log("e", "Missing or inaccessible: {0}".format(json_path))