mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Fix typing
CURA-7492
This commit is contained in:
parent
ddf312eca5
commit
9bf9bf9a3f
1 changed files with 3 additions and 3 deletions
|
@ -18,16 +18,16 @@ class ConnectionStatus(QObject):
|
||||||
cls.__instance = cls(*args, **kwargs)
|
cls.__instance = cls(*args, **kwargs)
|
||||||
return cls.__instance
|
return cls.__instance
|
||||||
|
|
||||||
def __init__(self, parent: Optional["QObject"] = None):
|
def __init__(self, parent: Optional["QObject"] = None) -> None:
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
|
||||||
self._is_internet_reachable: bool = True
|
self._is_internet_reachable = True # type: bool
|
||||||
|
|
||||||
@pyqtProperty(bool, notify = internetReachableChanged)
|
@pyqtProperty(bool, notify = internetReachableChanged)
|
||||||
def isInternetReachable(self) -> bool:
|
def isInternetReachable(self) -> bool:
|
||||||
return self._is_internet_reachable
|
return self._is_internet_reachable
|
||||||
|
|
||||||
def setOnlineStatus(self, new_status: bool):
|
def setOnlineStatus(self, new_status: bool) -> None:
|
||||||
old_status = self._is_internet_reachable
|
old_status = self._is_internet_reachable
|
||||||
self._is_internet_reachable = new_status
|
self._is_internet_reachable = new_status
|
||||||
if old_status != new_status:
|
if old_status != new_status:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue