From 1132e4c6f918a42704d0e271e925a1fef9a0caaa Mon Sep 17 00:00:00 2001 From: jelle Spijker Date: Tue, 6 Apr 2021 14:09:13 +0200 Subject: [PATCH 01/13] Added known Mac OSX issues to the Changelog of 4.9 beta This commit should be reverted on the branch with the fixes made by @rburema. --- resources/texts/change_log.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index 0070cf535d..b9f345eb2c 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -31,6 +31,8 @@ If you had (UX, visual, graphics card) problems, specifically on (newer) Mac OSX - Drop downs in Preference screen don't react to mouse-scroll. - Default language not selected in Preference screen. - Changelog takes long too load. +- Post-Processing submenu items are greyed-out and can't be selected on Mac OSX. +- Setting Visibility submenu items in the Preference screen are greyed-out and can't be selected on Mac OSX. * Bug Fixes - Fixed a security vulnerability on windows permitting the openssl library used to launch other programs. Thanks to Xavier Danest for raising this bug. From b2b258d35755844ea66fbbc071a2641cc1cd1b75 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Tue, 6 Apr 2021 14:53:20 +0200 Subject: [PATCH 02/13] Fix add script button list not working in MacOS Fixed by using the qt quick controls 2 CURA-8127 --- .../PostProcessingPlugin/PostProcessingPlugin.qml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml index 743e149866..2b3a141aa0 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml @@ -3,7 +3,9 @@ import QtQuick 2.2 import QtQuick.Controls 1.1 +import QtQuick.Controls 2.15 as QQC2 import QtQuick.Controls.Styles 1.1 +import QtQml.Models 2.15 as Models import QtQuick.Layouts 1.1 import QtQuick.Dialogs 1.1 import QtQuick.Window 2.2 @@ -235,7 +237,7 @@ UM.Dialog anchors.leftMargin: base.textMargin anchors.top: activeScriptsList.bottom anchors.topMargin: base.textMargin - menu: scriptsMenu + onClicked: scriptsMenu.open() style: ButtonStyle { label: Label @@ -244,15 +246,16 @@ UM.Dialog } } } - Menu + QQC2.Menu { id: scriptsMenu + width: parent.width - Instantiator + Models.Instantiator { model: manager.loadedScriptList - MenuItem + QQC2.MenuItem { text: manager.getScriptLabelByKey(modelData.toString()) onTriggered: manager.addScriptToList(modelData.toString()) @@ -422,7 +425,7 @@ UM.Dialog tooltip.target.x = position.x + 1 } - onHideTooltip: tooltip.hide() + function onHideTooltip() { tooltip.hide() } } } } From b3ea26c9556989d5f68d6a453bc199d76726907f Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 6 Apr 2021 15:11:43 +0200 Subject: [PATCH 03/13] Half-revert last-last-last changelog changes. CURA-8127 --- resources/texts/change_log.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index b9f345eb2c..67de0db06d 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -31,7 +31,6 @@ If you had (UX, visual, graphics card) problems, specifically on (newer) Mac OSX - Drop downs in Preference screen don't react to mouse-scroll. - Default language not selected in Preference screen. - Changelog takes long too load. -- Post-Processing submenu items are greyed-out and can't be selected on Mac OSX. - Setting Visibility submenu items in the Preference screen are greyed-out and can't be selected on Mac OSX. * Bug Fixes From 39e9dcd4f5523ce4df743dfbce4a468e7685d0fa Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Tue, 6 Apr 2021 16:37:06 +0200 Subject: [PATCH 04/13] Fix VersionUpgrade48to49 crashing if there is no "categories_expanded" If the 4.8 is started from a clean install and no category gets expanded in the settings panel, then the "categories_expanded" key will not exist in the [cura] preferences in cura.cfg. As a result, when the 4.9 gets started in this specific case, the version upgrade 48 to 49 will produce a crash and will be considered as "failed", which will then lead to cura requesting from the user to go from the entire onboarding flow instead of landing on the "What's new" pages (even though everything else has been properly updated). This commit fixes that by checking whether the "categories_expanded" key exists in the cura.cfg. --- .../VersionUpgrade/VersionUpgrade48to49/VersionUpgrade48to49.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade48to49/VersionUpgrade48to49.py b/plugins/VersionUpgrade/VersionUpgrade48to49/VersionUpgrade48to49.py index 789830ef08..bf21a6867d 100644 --- a/plugins/VersionUpgrade/VersionUpgrade48to49/VersionUpgrade48to49.py +++ b/plugins/VersionUpgrade/VersionUpgrade48to49/VersionUpgrade48to49.py @@ -29,7 +29,7 @@ class VersionUpgrade48to49(VersionUpgrade): # Update visibility settings to include new top_bottom category parser["general"]["visible_settings"] += ";top_bottom" - if any([setting in parser["cura"]["categories_expanded"] for setting in self._moved_visibility_settings]): + if "categories_expanded" in parser["cura"] and any([setting in parser["cura"]["categories_expanded"] for setting in self._moved_visibility_settings]): parser["cura"]["categories_expanded"] += ";top_bottom" result = io.StringIO() From 1e5d7623cb9a3cbd017cc730888c221a1704277a Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 7 Apr 2021 09:40:06 +0200 Subject: [PATCH 05/13] Make it more clear the updates where for MacOS BigSur. --- resources/texts/change_log.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index 67de0db06d..e75b51ee44 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -22,8 +22,8 @@ The ability to have thumbnails embedded. Contributed by Gravedigger7789. * Add checkbox for Extruder Offsets. Ability to enable or disable the extruder offsets to gcode. This will be enabled by default, unless it is in the printer's def.json file. Contributed by RFBomb. -* Various Mac OSX (and other) fixes afforded by upgrades to Python (to 3.8) and Qt (to 5.15). -If you had (UX, visual, graphics card) problems, specifically on (newer) Mac OSX versions, please try this new version. +* Cura should work properly on MacOS 'Big Sur' now, afforded by upgrades to Python (to 3.8) and Qt (to 5.15). +If you had (UX, visual, graphics card) problems, specifically on (newer) MacOS versions, like Big Sur, you should be able to use this new version. * Known UX issues that will be fixed before final in our current plan - Custom menu Materials and Nozzle menu now open at cursor position instead of under the menu button. From 33a812d696c23a27087394e41f5f2b52c01c39e9 Mon Sep 17 00:00:00 2001 From: jelle Spijker Date: Wed, 7 Apr 2021 11:06:06 +0200 Subject: [PATCH 06/13] Added typing fof KeyringAttributes This should hopefully shut mypy up. Contributes to CURA-7180 --- cura/OAuth2/KeyringAttribute.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cura/OAuth2/KeyringAttribute.py b/cura/OAuth2/KeyringAttribute.py index 37781cd889..0fb2a0c3c2 100644 --- a/cura/OAuth2/KeyringAttribute.py +++ b/cura/OAuth2/KeyringAttribute.py @@ -1,6 +1,6 @@ # Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. -from typing import Type, TYPE_CHECKING +from typing import Type, TYPE_CHECKING, Optional, List import keyring from keyring.backend import KeyringBackend @@ -20,14 +20,15 @@ if Platform.isWindows() and hasattr(sys, "frozen"): keyring.set_keyring(WinVaultKeyring()) # Even if errors happen, we don't want this stored locally: -DONT_EVER_STORE_LOCALLY = ["refresh_token"] +DONT_EVER_STORE_LOCALLY: List[str] = ["refresh_token"] + class KeyringAttribute: """ Descriptor for attributes that need to be stored in the keyring. With Fallback behaviour to the preference cfg file """ - def __get__(self, instance: Type["BaseModel"], owner: type) -> str: - if self._store_secure: + def __get__(self, instance: BaseModel, owner: type) -> Optional[str]: + if self._store_secure: # type: ignore try: value = keyring.get_password("cura", self._keyring_name) return value if value != "" else None @@ -38,7 +39,7 @@ class KeyringAttribute: else: return getattr(instance, self._name) - def __set__(self, instance: Type["BaseModel"], value: str): + def __set__(self, instance: BaseModel, value: Optional[str]): if self._store_secure: setattr(instance, self._name, None) try: From 4b1087a1386cacfd0446721796b6f96886e3886a Mon Sep 17 00:00:00 2001 From: jelle Spijker Date: Wed, 7 Apr 2021 11:25:39 +0200 Subject: [PATCH 07/13] Put BaseModel in quotes Contributes to CURA-7180 --- cura/OAuth2/KeyringAttribute.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/OAuth2/KeyringAttribute.py b/cura/OAuth2/KeyringAttribute.py index 0fb2a0c3c2..1d5bfaba3a 100644 --- a/cura/OAuth2/KeyringAttribute.py +++ b/cura/OAuth2/KeyringAttribute.py @@ -27,7 +27,7 @@ class KeyringAttribute: """ Descriptor for attributes that need to be stored in the keyring. With Fallback behaviour to the preference cfg file """ - def __get__(self, instance: BaseModel, owner: type) -> Optional[str]: + def __get__(self, instance: "BaseModel", owner: type) -> Optional[str]: if self._store_secure: # type: ignore try: value = keyring.get_password("cura", self._keyring_name) @@ -39,7 +39,7 @@ class KeyringAttribute: else: return getattr(instance, self._name) - def __set__(self, instance: BaseModel, value: Optional[str]): + def __set__(self, instance: "BaseModel", value: Optional[str]): if self._store_secure: setattr(instance, self._name, None) try: From 0d3803594417ee9a035c47acd57ea778041b89fb Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 7 Apr 2021 11:30:08 +0200 Subject: [PATCH 08/13] Add constructor for keyring attribute _store_secure was used, so it should be created on construction --- cura/OAuth2/KeyringAttribute.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cura/OAuth2/KeyringAttribute.py b/cura/OAuth2/KeyringAttribute.py index 37781cd889..47d5d5eb26 100644 --- a/cura/OAuth2/KeyringAttribute.py +++ b/cura/OAuth2/KeyringAttribute.py @@ -22,7 +22,11 @@ if Platform.isWindows() and hasattr(sys, "frozen"): # Even if errors happen, we don't want this stored locally: DONT_EVER_STORE_LOCALLY = ["refresh_token"] + class KeyringAttribute: + def __init__(self) -> None: + self._store_secure = True + """ Descriptor for attributes that need to be stored in the keyring. With Fallback behaviour to the preference cfg file """ From 00a360aca6c1c08ff56c05c9b70671cf2caf23b0 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 7 Apr 2021 11:32:09 +0200 Subject: [PATCH 09/13] Don't overload types in AMFReader The typing really doesn't like it if we first let a variable be a list and then an numpy array --- plugins/AMFReader/AMFReader.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/AMFReader/AMFReader.py b/plugins/AMFReader/AMFReader.py index ef785f2f53..5bbd25df1b 100644 --- a/plugins/AMFReader/AMFReader.py +++ b/plugins/AMFReader/AMFReader.py @@ -157,22 +157,22 @@ class AMFReader(MeshReader): tri_faces = tri_node.faces tri_vertices = tri_node.vertices - indices = [] - vertices = [] + indices_list = [] + vertices_list = [] index_count = 0 face_count = 0 for tri_face in tri_faces: face = [] for tri_index in tri_face: - vertices.append(tri_vertices[tri_index]) + vertices_list.append(tri_vertices[tri_index]) face.append(index_count) index_count += 1 - indices.append(face) + indices_list.append(face) face_count += 1 - vertices = numpy.asarray(vertices, dtype = numpy.float32) - indices = numpy.asarray(indices, dtype = numpy.int32) + vertices = numpy.asarray(vertices_list, dtype = numpy.float32) + indices = numpy.asarray(indices_list, dtype = numpy.int32) normals = calculateNormalsFromIndexedVertices(vertices, indices, face_count) mesh_data = MeshData(vertices = vertices, indices = indices, normals = normals,file_name = file_name) From 17d8751ec150f338e13ed19ef1ccce4e0f102b4d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 7 Apr 2021 11:39:28 +0200 Subject: [PATCH 10/13] Fix incorrect typing in keyring attribute It didn't need Type["basemodel"] but a direct base model --- cura/OAuth2/KeyringAttribute.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/OAuth2/KeyringAttribute.py b/cura/OAuth2/KeyringAttribute.py index 47d5d5eb26..0ec9a08ce2 100644 --- a/cura/OAuth2/KeyringAttribute.py +++ b/cura/OAuth2/KeyringAttribute.py @@ -30,7 +30,7 @@ class KeyringAttribute: """ Descriptor for attributes that need to be stored in the keyring. With Fallback behaviour to the preference cfg file """ - def __get__(self, instance: Type["BaseModel"], owner: type) -> str: + def __get__(self, instance: BaseModel, owner: type) -> str: if self._store_secure: try: value = keyring.get_password("cura", self._keyring_name) @@ -42,7 +42,7 @@ class KeyringAttribute: else: return getattr(instance, self._name) - def __set__(self, instance: Type["BaseModel"], value: str): + def __set__(self, instance: BaseModel, value: str): if self._store_secure: setattr(instance, self._name, None) try: From 3432720f7ca1af31fa3c57efdbb5ebe42e93b595 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 7 Apr 2021 11:42:51 +0200 Subject: [PATCH 11/13] Fix mypy issues caused by numpy upgrade --- cura/Arranging/ShapeArray.py | 10 +++++----- cura/LayerPolygon.py | 9 ++++----- cura/Snapshot.py | 4 ++-- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/cura/Arranging/ShapeArray.py b/cura/Arranging/ShapeArray.py index 840f9731c2..a063ec30bc 100644 --- a/cura/Arranging/ShapeArray.py +++ b/cura/Arranging/ShapeArray.py @@ -3,7 +3,7 @@ import numpy import copy -from typing import Optional, Tuple, TYPE_CHECKING +from typing import Optional, Tuple, TYPE_CHECKING, Union from UM.Math.Polygon import Polygon @@ -14,14 +14,14 @@ if TYPE_CHECKING: class ShapeArray: """Polygon representation as an array for use with :py:class:`cura.Arranging.Arrange.Arrange`""" - def __init__(self, arr: numpy.array, offset_x: float, offset_y: float, scale: float = 1) -> None: + def __init__(self, arr: numpy.ndarray, offset_x: float, offset_y: float, scale: float = 1) -> None: self.arr = arr self.offset_x = offset_x self.offset_y = offset_y self.scale = scale @classmethod - def fromPolygon(cls, vertices: numpy.array, scale: float = 1) -> "ShapeArray": + def fromPolygon(cls, vertices: numpy.ndarray, scale: float = 1) -> "ShapeArray": """Instantiate from a bunch of vertices :param vertices: @@ -98,7 +98,7 @@ class ShapeArray: return offset_shape_arr, hull_shape_arr @classmethod - def arrayFromPolygon(cls, shape: Tuple[int, int], vertices: numpy.array) -> numpy.array: + def arrayFromPolygon(cls, shape: Union[Tuple[int, int], numpy.ndarray], vertices: numpy.ndarray) -> numpy.ndarray: """Create :py:class:`numpy.ndarray` with dimensions defined by shape Fills polygon defined by vertices with ones, all other values zero @@ -126,7 +126,7 @@ class ShapeArray: return base_array @classmethod - def _check(cls, p1: numpy.array, p2: numpy.array, base_array: numpy.array) -> Optional[numpy.array]: + def _check(cls, p1: numpy.ndarray, p2: numpy.ndarray, base_array: numpy.ndarray) -> Optional[numpy.ndarray]: """Return indices that mark one side of the line, used by arrayFromPolygon Uses the line defined by p1 and p2 to check array of diff --git a/cura/LayerPolygon.py b/cura/LayerPolygon.py index 6e518e984a..7f62a0a8fa 100644 --- a/cura/LayerPolygon.py +++ b/cura/LayerPolygon.py @@ -65,7 +65,7 @@ class LayerPolygon: # When type is used as index returns true if type == LayerPolygon.InfillType or type == LayerPolygon.SkinType or type == LayerPolygon.SupportInfillType # Should be generated in better way, not hardcoded. - self._is_infill_or_skin_type_map = numpy.array([0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0], dtype = numpy.bool) + self._is_infill_or_skin_type_map = numpy.array([0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0], dtype = bool) self._build_cache_line_mesh_mask = None # type: Optional[numpy.ndarray] self._build_cache_needed_points = None # type: Optional[numpy.ndarray] @@ -73,18 +73,17 @@ class LayerPolygon: def buildCache(self) -> None: # For the line mesh we do not draw Infill or Jumps. Therefore those lines are filtered out. self._build_cache_line_mesh_mask = numpy.ones(self._jump_mask.shape, dtype = bool) - mesh_line_count = numpy.sum(self._build_cache_line_mesh_mask) self._index_begin = 0 - self._index_end = mesh_line_count + self._index_end = cast(int, numpy.sum(self._build_cache_line_mesh_mask)) - self._build_cache_needed_points = numpy.ones((len(self._types), 2), dtype = numpy.bool) + self._build_cache_needed_points = numpy.ones((len(self._types), 2), dtype = bool) # Only if the type of line segment changes do we need to add an extra vertex to change colors self._build_cache_needed_points[1:, 0][:, numpy.newaxis] = self._types[1:] != self._types[:-1] # Mark points as unneeded if they are of types we don't want in the line mesh according to the calculated mask numpy.logical_and(self._build_cache_needed_points, self._build_cache_line_mesh_mask, self._build_cache_needed_points ) self._vertex_begin = 0 - self._vertex_end = numpy.sum( self._build_cache_needed_points ) + self._vertex_end = cast(int, numpy.sum(self._build_cache_needed_points)) def build(self, vertex_offset: int, index_offset: int, vertices: numpy.ndarray, colors: numpy.ndarray, line_dimensions: numpy.ndarray, feedrates: numpy.ndarray, extruders: numpy.ndarray, line_types: numpy.ndarray, indices: numpy.ndarray) -> None: """Set all the arrays provided by the function caller, representing the LayerPolygon diff --git a/cura/Snapshot.py b/cura/Snapshot.py index bc7da4080a..ca9c442fb5 100644 --- a/cura/Snapshot.py +++ b/cura/Snapshot.py @@ -25,8 +25,8 @@ class Snapshot: pixels = numpy.frombuffer(pixel_array, dtype=numpy.uint8).reshape([height, width, 4]) # Find indices of non zero pixels nonzero_pixels = numpy.nonzero(pixels) - min_y, min_x, min_a_ = numpy.amin(nonzero_pixels, axis=1) - max_y, max_x, max_a_ = numpy.amax(nonzero_pixels, axis=1) + min_y, min_x, min_a_ = numpy.amin(nonzero_pixels, axis=1) # type: ignore + max_y, max_x, max_a_ = numpy.amax(nonzero_pixels, axis=1) # type: ignore return min_x, max_x, min_y, max_y From d49a90029f6b948b9c950a4055b68403d9a4a7b1 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 7 Apr 2021 14:02:29 +0200 Subject: [PATCH 12/13] Fix final set of typing issues --- cura/OAuth2/KeyringAttribute.py | 4 ++-- plugins/TrimeshReader/TrimeshReader.py | 12 ++++++------ .../VersionUpgrade48to49/VersionUpgrade48to49.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cura/OAuth2/KeyringAttribute.py b/cura/OAuth2/KeyringAttribute.py index 0ec9a08ce2..360196d4c2 100644 --- a/cura/OAuth2/KeyringAttribute.py +++ b/cura/OAuth2/KeyringAttribute.py @@ -30,7 +30,7 @@ class KeyringAttribute: """ Descriptor for attributes that need to be stored in the keyring. With Fallback behaviour to the preference cfg file """ - def __get__(self, instance: BaseModel, owner: type) -> str: + def __get__(self, instance: "BaseModel", owner: type) -> str: if self._store_secure: try: value = keyring.get_password("cura", self._keyring_name) @@ -42,7 +42,7 @@ class KeyringAttribute: else: return getattr(instance, self._name) - def __set__(self, instance: BaseModel, value: str): + def __set__(self, instance: "BaseModel", value: str): if self._store_secure: setattr(instance, self._name, None) try: diff --git a/plugins/TrimeshReader/TrimeshReader.py b/plugins/TrimeshReader/TrimeshReader.py index cbec2e2482..6aea321f15 100644 --- a/plugins/TrimeshReader/TrimeshReader.py +++ b/plugins/TrimeshReader/TrimeshReader.py @@ -145,22 +145,22 @@ class TrimeshReader(MeshReader): tri_faces = tri_node.faces tri_vertices = tri_node.vertices - indices = [] - vertices = [] + indices_list = [] + vertices_list = [] index_count = 0 face_count = 0 for tri_face in tri_faces: face = [] for tri_index in tri_face: - vertices.append(tri_vertices[tri_index]) + vertices_list.append(tri_vertices[tri_index]) face.append(index_count) index_count += 1 - indices.append(face) + indices_list.append(face) face_count += 1 - vertices = numpy.asarray(vertices, dtype = numpy.float32) - indices = numpy.asarray(indices, dtype = numpy.int32) + vertices = numpy.asarray(vertices_list, dtype = numpy.float32) + indices = numpy.asarray(indices_list, dtype = numpy.int32) normals = calculateNormalsFromIndexedVertices(vertices, indices, face_count) mesh_data = MeshData(vertices = vertices, indices = indices, normals = normals, file_name = file_name) diff --git a/plugins/VersionUpgrade/VersionUpgrade48to49/VersionUpgrade48to49.py b/plugins/VersionUpgrade/VersionUpgrade48to49/VersionUpgrade48to49.py index bf21a6867d..5ce3cb724f 100644 --- a/plugins/VersionUpgrade/VersionUpgrade48to49/VersionUpgrade48to49.py +++ b/plugins/VersionUpgrade/VersionUpgrade48to49/VersionUpgrade48to49.py @@ -102,7 +102,7 @@ class VersionUpgrade48to49(VersionUpgrade): if "shell" in parser: for setting in parser["shell"]: if setting in self._moved_visibility_settings: - parser["top_bottom"][setting] = None + parser["top_bottom"][setting] = None # type: ignore del parser["shell"][setting] result = io.StringIO() From 82ffdccac225c76676b64cc30aaffad238bfcec7 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 7 Apr 2021 17:15:22 +0200 Subject: [PATCH 13/13] Added type ignore since it does accept it --- cura/Arranging/ShapeArray.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Arranging/ShapeArray.py b/cura/Arranging/ShapeArray.py index a063ec30bc..5607c03663 100644 --- a/cura/Arranging/ShapeArray.py +++ b/cura/Arranging/ShapeArray.py @@ -110,7 +110,7 @@ class ShapeArray: :return: numpy array with dimensions defined by shape """ - base_array = numpy.zeros(shape, dtype = numpy.int32) # Initialize your array of zeros + base_array = numpy.zeros(shape, dtype = numpy.int32) # type: ignore # Initialize your array of zeros fill = numpy.ones(base_array.shape) * True # Initialize boolean array defining shape fill