Add some missing typing

This commit is contained in:
Jaime van Kessel 2020-01-10 14:25:35 +01:00
parent 3e07105edf
commit 81b33b8649
No known key found for this signature in database
GPG key ID: 3710727397403C91
18 changed files with 73 additions and 59 deletions

View file

@ -1,6 +1,6 @@
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import List
from typing import List, Optional
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
from UM.Logger import Logger
@ -8,6 +8,7 @@ from UM.Math.Polygon import Polygon
from UM.Math.Vector import Vector
from UM.Scene.SceneNode import SceneNode
from cura.Arranging.ShapeArray import ShapeArray
from cura.BuildVolume import BuildVolume
from cura.Scene import ZOffsetDecorator
from collections import namedtuple
@ -27,7 +28,7 @@ LocationSuggestion = namedtuple("LocationSuggestion", ["x", "y", "penalty_points
#
# Note: Make sure the scale is the same between ShapeArray objects and the Arrange instance.
class Arrange:
build_volume = None
build_volume = None # type: Optional[BuildVolume]
def __init__(self, x, y, offset_x, offset_y, scale= 0.5):
self._scale = scale # convert input coordinates to arrange coordinates