mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 06:23:59 -06:00
Add typing and appease MYPY
This commit is contained in:
parent
a12c0e8d9e
commit
a573a598b0
6 changed files with 83 additions and 76 deletions
|
@ -10,7 +10,7 @@ class AvrFirmwareUpdater(FirmwareUpdater):
|
|||
def __init__(self, output_device: PrinterOutputDevice) -> None:
|
||||
super().__init__(output_device)
|
||||
|
||||
def _updateFirmware(self):
|
||||
def _updateFirmware(self) -> None:
|
||||
try:
|
||||
hex_file = intelHex.readHex(self._firmware_location)
|
||||
assert len(hex_file) > 0
|
||||
|
|
|
@ -99,12 +99,12 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
|||
application.triggerNextExitCheck()
|
||||
|
||||
@pyqtSlot(str)
|
||||
def updateFirmware(self, file):
|
||||
def updateFirmware(self, file: Any[str, QUrl]) -> None:
|
||||
self._firmware_updater.updateFirmware(file)
|
||||
|
||||
## Reset USB device settings
|
||||
#
|
||||
def resetDeviceSettings(self):
|
||||
def resetDeviceSettings(self) -> None:
|
||||
self._firmware_name = None
|
||||
|
||||
## Request the current scene to be sent to a USB-connected printer.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue