Add typings and fix code style

This commit is contained in:
Ian Paschal 2018-09-06 16:57:45 +02:00
parent 53d083e232
commit 4cc1b6ce02
9 changed files with 61 additions and 39 deletions

View file

@ -22,8 +22,8 @@ class ExtruderOutputModel(QObject):
super().__init__(parent)
self._printer = printer # type: PrinterOutputModel
self._position = position
self._target_hotend_temperature = 0 # type: float
self._hotend_temperature = 0 # type: float
self._target_hotend_temperature = 0.0 # type: float
self._hotend_temperature = 0.0 # type: float
self._is_preheating = False
@ -50,7 +50,7 @@ class ExtruderOutputModel(QObject):
def activeMaterial(self) -> Optional["MaterialOutputModel"]:
return self._extruder_configuration.activeMaterial
def updateActiveMaterial(self, material: Optional["MaterialOutputModel"]):
def updateActiveMaterial(self, material: Optional["MaterialOutputModel"]) -> None:
self._extruder_configuration.setMaterial(material)
## Update the hotend temperature. This only changes it locally.