diff --git a/cura/API/Backups.py b/cura/API/Backups.py index a2423bd798..5964557264 100644 --- a/cura/API/Backups.py +++ b/cura/API/Backups.py @@ -1,5 +1,7 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. +from typing import Tuple, Optional + from cura.Backups.BackupsManager import BackupsManager @@ -17,7 +19,7 @@ class Backups: ## Create a new back-up using the BackupsManager. # \return Tuple containing a ZIP file with the back-up data and a dict # with metadata about the back-up. - def createBackup(self) -> (bytes, dict): + def createBackup(self) -> Tuple[Optional[bytes], Optional[dict]]: return self.manager.createBackup() ## Restore a back-up using the BackupsManager. diff --git a/cura/Backups/BackupsManager.py b/cura/Backups/BackupsManager.py index 850b0a2edc..bc560a8dd9 100644 --- a/cura/Backups/BackupsManager.py +++ b/cura/Backups/BackupsManager.py @@ -1,6 +1,6 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. -from typing import Optional +from typing import Optional, Tuple from UM.Logger import Logger from cura.Backups.Backup import Backup @@ -18,7 +18,7 @@ class BackupsManager: ## Get a back-up of the current configuration. # \return A tuple containing a ZipFile (the actual back-up) and a dict # containing some metadata (like version). - def createBackup(self) -> (Optional[bytes], Optional[dict]): + def createBackup(self) -> Tuple[Optional[bytes], Optional[dict]]: self._disableAutoSave() backup = Backup() backup.makeFromCurrent()