mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 16:18:58 +08:00
Fix two mypy warnings
CURA-6522
This commit is contained in:
parent
2d8a415a69
commit
f4c68f4e71
@ -99,6 +99,8 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
|||||||
# Parent can be None if node is just loaded.
|
# Parent can be None if node is just loaded.
|
||||||
if self._is_singular_one_at_a_time_node():
|
if self._is_singular_one_at_a_time_node():
|
||||||
hull = self.getConvexHullHeadFull()
|
hull = self.getConvexHullHeadFull()
|
||||||
|
if hull is None:
|
||||||
|
return None
|
||||||
hull = self._add2DAdhesionMargin(hull)
|
hull = self._add2DAdhesionMargin(hull)
|
||||||
return hull
|
return hull
|
||||||
|
|
||||||
@ -144,7 +146,7 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
|||||||
def getConvexHullBoundary(self) -> Optional[Polygon]:
|
def getConvexHullBoundary(self) -> Optional[Polygon]:
|
||||||
if self._node is None:
|
if self._node is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if self._node.callDecoration("isNonPrintingMesh"):
|
if self._node.callDecoration("isNonPrintingMesh"):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@ -433,9 +435,9 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
|||||||
def _is_singular_one_at_a_time_node(self) -> bool:
|
def _is_singular_one_at_a_time_node(self) -> bool:
|
||||||
if self._node is None:
|
if self._node is None:
|
||||||
return False
|
return False
|
||||||
return self._global_stack \
|
return self._global_stack is not None \
|
||||||
and self._global_stack.getProperty("print_sequence", "value") == "one_at_a_time" \
|
and self._global_stack.getProperty("print_sequence", "value") == "one_at_a_time" \
|
||||||
and not self.hasGroupAsParent(self._node)
|
and not self.hasGroupAsParent(self._node)
|
||||||
|
|
||||||
_affected_settings = [
|
_affected_settings = [
|
||||||
"adhesion_type", "raft_margin", "print_sequence",
|
"adhesion_type", "raft_margin", "print_sequence",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user