Fix formatting according to Cura code style

This commit is contained in:
ChrisTerBeke 2018-12-03 23:13:24 +01:00
parent 5fdff17782
commit c40d76f9ee
No known key found for this signature in database
GPG key ID: A49F1AB9D7E0C263

View file

@ -217,7 +217,8 @@ class CloudOutputDevice(NetworkedPrinterOutputDevice):
def _update(self) -> None:
super()._update()
Logger.log("i", "Calling the cloud cluster")
self.get("{root}/cluster/{cluster_id}/status".format(root=self.CLUSTER_API_ROOT, cluster_id=self._device_id),
self.get("{root}/cluster/{cluster_id}/status".format(root = self.CLUSTER_API_ROOT,
cluster_id = self._device_id),
on_finished = self._onStatusCallFinished)
## Method called when HTTP request to status endpoint is finished.
@ -304,15 +305,15 @@ class CloudOutputDevice(NetworkedPrinterOutputDevice):
material_type = container.getMetaDataEntry("material")
name = container.getName()
else:
Logger.log("w",
"Unable to find material with guid {guid}. Using data as provided by cluster".format(
guid=material.guid))
Logger.log("w", "Unable to find material with guid {guid}. Using data as provided by cluster"
.format(guid = material.guid))
color = material.color
brand = material.brand
material_type = material.material
name = "Empty" if material.material == "empty" else "Unknown"
return MaterialOutputModel(guid=material.guid, type=material_type, brand=brand, color=color, name=name)
return MaterialOutputModel(guid = material.guid, type = material_type, brand = brand, color = color,
name = name)
def _updatePrintJobs(self, jobs: List[CloudClusterPrintJob]) -> None:
remote_jobs = {j.uuid: j for j in jobs} # type: Dict[str, CloudClusterPrintJob]