Add more typing & documentation

Even more boyscouting. This code seems to be far too complex for what it should be...

CURA-8463
This commit is contained in:
Jaime van Kessel 2022-08-30 11:04:15 +02:00
parent 21b8f083f2
commit 30bc0d04bf
No known key found for this signature in database
GPG key ID: C85F7A3AF1BAA7C4

View file

@ -172,9 +172,11 @@ class CloudOutputDeviceManager:
May take a long time to complete. This currently forcefully calls the "processEvents", which isn't
the nicest solution out there. We might need to consider moving this into a job later!
"""
new_devices = []
new_devices: List[CloudOutputDevice] = []
remote_clusters_added = False
host_guid_map = {machine.getMetaDataEntry(self.META_HOST_GUID): device_cluster_id
# Create a map that maps the HOST_GUID to the DEVICE_CLUSTER_ID
host_guid_map: Dict[str, str] = {machine.getMetaDataEntry(self.META_HOST_GUID): device_cluster_id
for device_cluster_id, machine in self._um_cloud_printers.items()
if machine.getMetaDataEntry(self.META_HOST_GUID)}