mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 13:03:59 -06:00
Added some typing annotation
Contributes to: CURA-8587
This commit is contained in:
parent
fb950e39c9
commit
e4d469b6a1
1 changed files with 4 additions and 3 deletions
|
@ -2,17 +2,18 @@
|
|||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
from typing import Optional, TYPE_CHECKING
|
||||
|
||||
from PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal
|
||||
from PyQt5.QtCore import pyqtProperty, pyqtSignal
|
||||
|
||||
from cura.CuraApplication import CuraApplication
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from PyQt5.QtCore import QObject
|
||||
from UM.PluginRegistry import PluginRegistry
|
||||
from cura.CuraPackageManager import CuraPackageManager
|
||||
|
||||
|
||||
class RestartManager(QObject):
|
||||
def __init__(self, parent: Optional[QObject] = None):
|
||||
def __init__(self, parent: Optional[QObject] = None) -> None:
|
||||
super().__init__(parent = parent)
|
||||
self._manager: "CuraPackageManager" = CuraApplication.getInstance().getPackageManager()
|
||||
self._plugin_registry: "PluginRegistry" = CuraApplication.getInstance().getPluginRegistry()
|
||||
|
@ -22,7 +23,7 @@ class RestartManager(QObject):
|
|||
|
||||
self._restart_needed = False
|
||||
|
||||
def checkIfRestartNeeded(self):
|
||||
def checkIfRestartNeeded(self) -> None:
|
||||
if self._manager.hasPackagesToRemoveOrInstall or len(self._plugin_registry.getCurrentSessionActivationChangedPlugins()) > 0:
|
||||
self._restart_needed = True
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue