Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2020-01-20 18:03:56 +0300
committerJaime van Kessel <nallath@gmail.com>2020-01-20 18:03:56 +0300
commit06ccd882e1395909cfa2d66be6310270bcfc94bb (patch)
treea8521f15c56406558f6a83d17d2e6f4e2c1d3e86 /plugins/3MFWriter
parent52ce10639932cc9da4c471864bdb315e6f33a295 (diff)
Add missing typing
CURA-6627
Diffstat (limited to 'plugins/3MFWriter')
-rw-r--r--plugins/3MFWriter/ThreeMFWorkspaceWriter.py3
-rw-r--r--plugins/3MFWriter/ThreeMFWriter.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/3MFWriter/ThreeMFWorkspaceWriter.py b/plugins/3MFWriter/ThreeMFWorkspaceWriter.py
index 08918e1c12..10a21f445b 100644
--- a/plugins/3MFWriter/ThreeMFWorkspaceWriter.py
+++ b/plugins/3MFWriter/ThreeMFWorkspaceWriter.py
@@ -80,7 +80,8 @@ class ThreeMFWorkspaceWriter(WorkspaceWriter):
mesh_writer.setStoreArchive(False)
return True
- def _writePluginMetadataToArchive(self, archive):
+ @staticmethod
+ def _writePluginMetadataToArchive(archive: zipfile.ZipFile) -> None:
file_name_template = "%s/plugin_metadata.json"
for plugin_id, metadata in Application.getInstance().getWorkspaceMetadataStorage().getAllData().items():
diff --git a/plugins/3MFWriter/ThreeMFWriter.py b/plugins/3MFWriter/ThreeMFWriter.py
index 640aabd30c..9860804542 100644
--- a/plugins/3MFWriter/ThreeMFWriter.py
+++ b/plugins/3MFWriter/ThreeMFWriter.py
@@ -1,5 +1,6 @@
# Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the LGPLv3 or higher.
+from typing import Optional
from UM.Mesh.MeshWriter import MeshWriter
from UM.Math.Vector import Vector
@@ -40,7 +41,7 @@ class ThreeMFWriter(MeshWriter):
}
self._unit_matrix_string = self._convertMatrixToString(Matrix())
- self._archive = None
+ self._archive = None # type: Optional[zipfile.ZipFile]
self._store_archive = False
def _convertMatrixToString(self, matrix):