mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 08:39:01 +08:00
Fix typing
CURA-7492
This commit is contained in:
parent
ddf312eca5
commit
9bf9bf9a3f
@ -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…
x
Reference in New Issue
Block a user