From 0eea73d2a9613debc3c1788cc8cddf271ece0c5e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 30 Dec 2019 12:57:04 +0100 Subject: [PATCH] Fix typing CURA-6255 --- plugins/USBPrinting/USBPrinterOutputDevice.py | 2 +- plugins/XmlMaterialProfile/XmlMaterialProfile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 6c92d5a93a..adb3b03700 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -88,7 +88,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._firmware_name_requested = False self._firmware_updater = AvrFirmwareUpdater(self) - plugin_path = PluginRegistry.getInstance().getPluginPath("USBPrinting") + plugin_path = cast(str, PluginRegistry.getInstance().getPluginPath("USBPrinting")) self._monitor_view_qml_path = os.path.join(plugin_path, "MonitorItem.qml") CuraApplication.getInstance().getOnExitCallbackManager().addCallback(self._checkActivePrintingUponAppExit) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 2228cd4993..30bbecc86e 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -1069,7 +1069,7 @@ class XmlMaterialProfile(InstanceContainer): # This loads the mapping from a file. @classmethod def getProductIdMap(cls) -> Dict[str, List[str]]: - plugin_path = PluginRegistry.getInstance().getPluginPath("XmlMaterialProfile") + plugin_path = cast(str, PluginRegistry.getInstance().getPluginPath("XmlMaterialProfile")) product_to_id_file = os.path.join(plugin_path, "product_to_id.json") with open(product_to_id_file, encoding = "utf-8") as f: product_to_id_map = json.load(f)