Fix some PR comments, cleanup imports

This commit is contained in:
ChrisTerBeke 2018-11-23 14:11:43 +01:00
parent 8ee39c0489
commit 2fc5061c41
2 changed files with 13 additions and 17 deletions

View file

@ -15,10 +15,10 @@ from cura.CuraApplication import CuraApplication
# This was originally part of NetworkedPrinterOutputDevice but was moved out for re-use in other classes.
class NetworkClient:
def __init__(self, application: CuraApplication = None):
def __init__(self) -> None:
# Use the given application instance or get the singleton instance.
self._application = application or CuraApplication.getInstance()
self._application = CuraApplication.getInstance()
# Network manager instance to use for this client.
self._manager = None # type: Optional[QNetworkAccessManager]
@ -89,7 +89,7 @@ class NetworkClient:
def _validateManager(self) -> None:
if self._manager is None:
self._createNetworkManager()
assert (self._manager is not None)
assert self._manager is not None
## Callback for when the network manager detects that authentication is required but was not given.
@staticmethod