diff options
author | Ghostkeeper <rubend@tutanota.com> | 2018-03-08 16:23:14 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2018-03-08 16:23:14 +0300 |
commit | 375770818b762a9d75b159e260b5c879fa15e7c6 (patch) | |
tree | 99c7171521e8b9b10aae419e34ea68bc407f2ba5 /plugins/UltimakerMachineActions | |
parent | 2a10c9a2d72dd4672032847e9856b222a63f7a55 (diff) |
Add typing for _getPrinterOutputDevices
Then my IDE will give hints on where a printer of the wrong type is being added.
Contributes to issue CURA-5061.
Diffstat (limited to 'plugins/UltimakerMachineActions')
-rw-r--r-- | plugins/UltimakerMachineActions/BedLevelMachineAction.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/UltimakerMachineActions/BedLevelMachineAction.py b/plugins/UltimakerMachineActions/BedLevelMachineAction.py index 04b6cf1acc..738fd81c63 100644 --- a/plugins/UltimakerMachineActions/BedLevelMachineAction.py +++ b/plugins/UltimakerMachineActions/BedLevelMachineAction.py @@ -1,3 +1,8 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + +from typing import List + from cura.MachineAction import MachineAction from cura.PrinterOutputDevice import PrinterOutputDevice @@ -32,7 +37,7 @@ class BedLevelMachineAction(MachineAction): printer_output_devices[0].moveHead(0, 0, 3) printer_output_devices[0].homeHead() - def _getPrinterOutputDevices(self): + def _getPrinterOutputDevices(self) -> List[PrinterOutputDevice]: return [printer_output_device for printer_output_device in Application.getInstance().getOutputDeviceManager().getOutputDevices() if isinstance(printer_output_device, PrinterOutputDevice)] @pyqtSlot() |