Skip to content
Snippets Groups Projects
Commit a631e6b6 authored by Oscar Gustafsson's avatar Oscar Gustafsson :bicyclist:
Browse files

execution_time can return None

parent 19e2ff80
No related branches found
No related tags found
No related merge requests found
Pipeline #87878 passed
...@@ -890,9 +890,7 @@ class AbstractOperation(Operation, AbstractGraphComponent): ...@@ -890,9 +890,7 @@ class AbstractOperation(Operation, AbstractGraphComponent):
) )
@property @property
def execution_time(self) -> int: def execution_time(self) -> Optional[int]:
if self._execution_time is None:
raise ValueError("No execution time specified.")
return self._execution_time return self._execution_time
@execution_time.setter @execution_time.setter
......
...@@ -229,7 +229,7 @@ class GraphicsComponentItem(QGraphicsItemGroup): ...@@ -229,7 +229,7 @@ class GraphicsComponentItem(QGraphicsItemGroup):
self._label_item.setPos(self._component_item.pos() + center) self._label_item.setPos(self._component_item.pos() + center)
## execution time ## execution time
if self._operation.execution_time: if self._operation.execution_time is not None:
self._execution_time_item = QGraphicsRectItem( self._execution_time_item = QGraphicsRectItem(
0, 0, self._operation.execution_time, self._height 0, 0, self._operation.execution_time, self._height
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment