mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -06:00
Fix formatting according to Cura code style
This commit is contained in:
parent
5fdff17782
commit
c40d76f9ee
1 changed files with 12 additions and 11 deletions
|
@ -217,7 +217,8 @@ class CloudOutputDevice(NetworkedPrinterOutputDevice):
|
||||||
def _update(self) -> None:
|
def _update(self) -> None:
|
||||||
super()._update()
|
super()._update()
|
||||||
Logger.log("i", "Calling the cloud cluster")
|
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)
|
on_finished = self._onStatusCallFinished)
|
||||||
|
|
||||||
## Method called when HTTP request to status endpoint is finished.
|
## Method called when HTTP request to status endpoint is finished.
|
||||||
|
@ -304,15 +305,15 @@ class CloudOutputDevice(NetworkedPrinterOutputDevice):
|
||||||
material_type = container.getMetaDataEntry("material")
|
material_type = container.getMetaDataEntry("material")
|
||||||
name = container.getName()
|
name = container.getName()
|
||||||
else:
|
else:
|
||||||
Logger.log("w",
|
Logger.log("w", "Unable to find material with guid {guid}. Using data as provided by cluster"
|
||||||
"Unable to find material with guid {guid}. Using data as provided by cluster".format(
|
.format(guid = material.guid))
|
||||||
guid=material.guid))
|
|
||||||
color = material.color
|
color = material.color
|
||||||
brand = material.brand
|
brand = material.brand
|
||||||
material_type = material.material
|
material_type = material.material
|
||||||
name = "Empty" if material.material == "empty" else "Unknown"
|
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:
|
def _updatePrintJobs(self, jobs: List[CloudClusterPrintJob]) -> None:
|
||||||
remote_jobs = {j.uuid: j for j in jobs} # type: Dict[str, CloudClusterPrintJob]
|
remote_jobs = {j.uuid: j for j in jobs} # type: Dict[str, CloudClusterPrintJob]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue