CURA-5330 Add return type to some constructors

This commit is contained in:
Diego Prado Gesto 2018-06-13 11:01:30 +02:00
parent 6e364f0895
commit f1b0c6238f
4 changed files with 4 additions and 4 deletions

View file

@ -16,7 +16,7 @@ from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
#
# Note that in order to increase precision, the 24 bit depth value is encoded into all three of the R,G & B channels
class PickingPass(RenderPass):
def __init__(self, width: int, height: int):
def __init__(self, width: int, height: int) -> None:
super().__init__("picking", width, height)
self._renderer = Application.getInstance().getRenderer()

View file

@ -33,7 +33,7 @@ def prettier_color(color_list):
#
# This is useful to get a preview image of a scene taken from a different location as the active camera.
class PreviewPass(RenderPass):
def __init__(self, width: int, height: int):
def __init__(self, width: int, height: int) -> None:
super().__init__("preview", width, height, 0)
self._camera = None # type: Optional[Camera]

View file

@ -224,5 +224,5 @@ class PrinterOutputDevice(QObject, OutputDevice):
## Get the name of device firmware
#
# This name can be used to define device type
def getFirmwareName(self) -> str:
def getFirmwareName(self) -> Optional[str]:
return self._firmware_name

View file

@ -16,7 +16,7 @@ from UM.Signal import Signal
class CuraSceneController(QObject):
activeBuildPlateChanged = Signal()
def __init__(self, objects_model: ObjectsModel, multi_build_plate_model: MultiBuildPlateModel):
def __init__(self, objects_model: ObjectsModel, multi_build_plate_model: MultiBuildPlateModel) -> None:
super().__init__()
self._objects_model = objects_model