diff options
author | Lipu Fei <lipu.fei815@gmail.com> | 2018-09-28 13:06:57 +0300 |
---|---|---|
committer | Lipu Fei <lipu.fei815@gmail.com> | 2018-09-28 13:07:00 +0300 |
commit | dd150bbab979521c621f37b69b30b367229bedca (patch) | |
tree | 1d24a992a864f4281e071057734970bd286aeba1 /cura/Backups | |
parent | 3b70e5eb6bcbab6da11f6864b85a6a23ae0ccc30 (diff) |
Resolve circular imports for CuraAPI
Diffstat (limited to 'cura/Backups')
-rw-r--r-- | cura/Backups/BackupsManager.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cura/Backups/BackupsManager.py b/cura/Backups/BackupsManager.py index 67e2a222f1..a4d8528960 100644 --- a/cura/Backups/BackupsManager.py +++ b/cura/Backups/BackupsManager.py @@ -1,11 +1,13 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. -from typing import Dict, Optional, Tuple +from typing import Dict, Optional, Tuple, TYPE_CHECKING from UM.Logger import Logger from cura.Backups.Backup import Backup -from cura.CuraApplication import CuraApplication + +if TYPE_CHECKING: + from cura.CuraApplication import CuraApplication ## The BackupsManager is responsible for managing the creating and restoring of @@ -13,8 +15,8 @@ from cura.CuraApplication import CuraApplication # # Back-ups themselves are represented in a different class. class BackupsManager: - def __init__(self): - self._application = CuraApplication.getInstance() + def __init__(self, application: "CuraApplication") -> None: + self._application = application ## Get a back-up of the current configuration. # \return A tuple containing a ZipFile (the actual back-up) and a dict |