diff options
author | Jaime van Kessel <nallath@gmail.com> | 2019-07-23 13:58:46 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2019-07-23 13:58:46 +0300 |
commit | 9ceb9ce18b8f0d2c84ec8378884d8a747e1ca14e (patch) | |
tree | 4f0f3d11b1f414a0a562791fc14775f554035399 /plugins | |
parent | 34e823e1890b4581743722e01170de7d760d6835 (diff) |
Fix typing issues
They were caused by upgrading to a higher mypy version, which found more mistakes
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/SimulationView/SimulationView.py | 4 | ||||
-rw-r--r-- | plugins/XmlMaterialProfile/XmlMaterialProfile.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/SimulationView/SimulationView.py b/plugins/SimulationView/SimulationView.py index 3b2db2efac..18f436b13a 100644 --- a/plugins/SimulationView/SimulationView.py +++ b/plugins/SimulationView/SimulationView.py @@ -572,14 +572,14 @@ class SimulationView(CuraView): self._current_layer_jumps = job.getResult().get("jumps") self._controller.getScene().sceneChanged.emit(self._controller.getScene().getRoot()) - self._top_layers_job = None # type: Optional["_CreateTopLayersJob"] + self._top_layers_job = None def _updateWithPreferences(self) -> None: self._solid_layers = int(Application.getInstance().getPreferences().getValue("view/top_layer_count")) self._only_show_top_layers = bool(Application.getInstance().getPreferences().getValue("view/only_show_top_layers")) self._compatibility_mode = self._evaluateCompatibilityMode() - self.setSimulationViewType(int(float(Application.getInstance().getPreferences().getValue("layerview/layer_view_type")))); + self.setSimulationViewType(int(float(Application.getInstance().getPreferences().getValue("layerview/layer_view_type")))) for extruder_nr, extruder_opacity in enumerate(Application.getInstance().getPreferences().getValue("layerview/extruder_opacities").split("|")): try: diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 10a3a09c68..8d0177c165 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -969,7 +969,7 @@ class XmlMaterialProfile(InstanceContainer): machine_compatibility = cls._parseCompatibleValue(entry.text) for identifier in machine.iterfind("./um:machine_identifier", cls.__namespaces): - machine_id_list = product_id_map.get(identifier.get("product"), []) + machine_id_list = product_id_map.get(identifier.get("product", ""), []) if not machine_id_list: machine_id_list = cls.getPossibleDefinitionIDsFromName(identifier.get("product")) @@ -1001,7 +1001,7 @@ class XmlMaterialProfile(InstanceContainer): result_metadata.append(new_material_metadata) buildplates = machine.iterfind("./um:buildplate", cls.__namespaces) - buildplate_map = {} # type: Dict[str, Dict[str, bool]] + buildplate_map = {} # type: Dict[str, Dict[str, bool]] buildplate_map["buildplate_compatible"] = {} buildplate_map["buildplate_recommended"] = {} for buildplate in buildplates: |