diff options
author | Jaime van Kessel <nallath@gmail.com> | 2020-01-10 16:25:35 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2020-01-10 16:58:53 +0300 |
commit | 81b33b864959610ea5a367d3149706d35ca499e2 (patch) | |
tree | e828e6e8950529d318d2f77e4be007d48a1d3e5b /cura/CuraPackageManager.py | |
parent | 3e07105edfa12651980abe61e0141127d60598f0 (diff) |
Add some missing typing
Diffstat (limited to 'cura/CuraPackageManager.py')
-rw-r--r-- | cura/CuraPackageManager.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index 6422469bdf..99f2072644 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -1,7 +1,7 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. -from typing import List, Tuple +from typing import List, Tuple, TYPE_CHECKING, Optional from cura.CuraApplication import CuraApplication #To find some resource types. from cura.Settings.GlobalStack import GlobalStack @@ -9,12 +9,16 @@ from cura.Settings.GlobalStack import GlobalStack from UM.PackageManager import PackageManager #The class we're extending. from UM.Resources import Resources #To find storage paths for some resource types. +if TYPE_CHECKING: + from UM.Qt.QtApplication import QtApplication + from PyQt5.QtCore import QObject + class CuraPackageManager(PackageManager): - def __init__(self, application, parent = None): + def __init__(self, application: "QtApplication", parent: Optional["QObject"] = None): super().__init__(application, parent) - def initialize(self): + def initialize(self) -> None: self._installation_dirs_dict["materials"] = Resources.getStoragePath(CuraApplication.ResourceTypes.MaterialInstanceContainer) self._installation_dirs_dict["qualities"] = Resources.getStoragePath(CuraApplication.ResourceTypes.QualityInstanceContainer) |