Skip to content

Commit bc6ef4a

Browse files
committed
Linting: Remove trailing whitespaces
1 parent e0104af commit bc6ef4a

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

meshroom/core/taskManager.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def isRunning(self):
3939
return self._state == State.RUNNING
4040

4141
def waitForChunkCreation(self, node):
42-
4342
if hasattr(node, "_chunksCreated") and node._chunksCreated:
4443
return True
4544

@@ -104,7 +103,7 @@ def run(self):
104103

105104
if self._manager.isChunkCancelled(chunk):
106105
continue
107-
106+
108107
_nodeName, _node, _nbNodes = node.nodeType, nId+1, len(self._manager._nodesToProcess)
109108

110109
if multiChunks:
@@ -140,7 +139,7 @@ def run(self):
140139
else:
141140
self._manager._nodesToProcess = []
142141
self._state = State.DEAD
143-
142+
144143
# Signals and properties
145144
createChunksSignal = Signal(BaseObject)
146145

@@ -177,7 +176,7 @@ def createChunks(self, node: Node):
177176
self.chunksCreated.emit(node)
178177
except Exception as e:
179178
logging.error(f"Failed to create chunks for {node.name}: {e}")
180-
self.chunksCreated.emit(node) # Still emit to unblock waiting thread
179+
self.chunksCreated.emit(node) # Still emit to unblock waiting thread
181180

182181
def isChunkCancelled(self, chunk):
183182
for i, ch in enumerate(self._cancelledChunks):
@@ -186,7 +185,7 @@ def isChunkCancelled(self, chunk):
186185
return True
187186
return False
188187

189-
def requestBlockRestart(self):
188+
def requestBlockRestart(self):
190189
"""
191190
Block computing.
192191
Note: should only be used to completely stop computing.
@@ -208,7 +207,7 @@ def blockRestart(self):
208207
self._nodesToProcess = []
209208
self._cancelledChunks = []
210209
self._thread._state = State.DEAD
211-
210+
212211
@Slot()
213212
def pauseProcess(self):
214213
if self._thread.isRunning():
@@ -269,7 +268,7 @@ def compute(self, graph: Graph = None, toNodes: list[Node] = None, forceCompute:
269268
:param forceCompute: force the computation despite nodes status.
270269
:param forceStatus: force the computation even if some nodes are submitted externally.
271270
"""
272-
271+
273272
self._graph = graph
274273

275274
self.updateNodes()
@@ -493,7 +492,7 @@ def submit(self, graph, submitter=None, toNodes=None, submitLabel="{projectName}
493492
raise RuntimeError(f"[SUBMITTING] Unknown Submitter:\n"
494493
f"Unknown Submitter called '{submitter}'. "
495494
f"Available submitters are: '{str(meshroom.core.submitters.keys())}'.")
496-
495+
497496
# TODO : If possible with the submitter (ATTACH_JOB)
498497

499498
# Update task manager's lists
@@ -525,7 +524,7 @@ def submit(self, graph, submitter=None, toNodes=None, submitLabel="{projectName}
525524
jobManager.resetNodeJob(node)
526525

527526
graph.updateMonitoredFiles()
528-
527+
529528
flowEdges = graph.flowEdges(startNodes=toNodes)
530529
edgesToProcess = set(edgesToProcess).intersection(flowEdges)
531530

meshroom/ui/graph.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -591,20 +591,20 @@ def cancelNodeComputation(self, node):
591591
for n in node.getOutputNodes(recursive=True, dependenciesOnly=True):
592592
n.clearSubmittedChunks()
593593
self._taskManager.removeNode(n, displayList=True, processList=True)
594-
594+
595595
def isChunkComputingLocally(self, chunk):
596596
# update graph computing status
597597
computingLocally = chunk._status.execMode == ExecMode.LOCAL and \
598598
(sessionUid in (chunk.node._nodeStatus.submitterSessionUid, chunk._status.computeSessionUid)) and \
599599
(chunk._status.status in (Status.RUNNING, Status.SUBMITTED))
600600
return computingLocally
601-
601+
602602
def isChunkComputingExternally(self, chunk):
603603
# Note: We do not check computeSessionUid for the submitted status,
604604
# as the source instance of the submit has no importance.
605605
return (chunk._status.execMode == ExecMode.EXTERN) and \
606606
chunk._status.status in (Status.RUNNING, Status.SUBMITTED)
607-
607+
608608
@Slot(NodeChunk)
609609
def stopTask(self, chunk: NodeChunk):
610610
""" Stop the selected task """
@@ -674,7 +674,7 @@ def restartTask(self, chunk: NodeChunk):
674674
else:
675675
self.parent().showMessage(f"Relaunched chunk {chunkIteration} of {node.label}")
676676
else:
677-
# For this we would need to use a pool (with either chunks or nodes)
677+
# For this we would need to use a pool (with either chunks or nodes)
678678
# instead of the list of nodes that are processed serially
679679
self.parent().showMessage(f"Chunks cannot be launched individually locally", "warning")
680680
if self.canComputeNode(node):
@@ -850,9 +850,9 @@ def updateGraphComputingStatus(self):
850850
continue
851851
if node._nodeStatus.status in (Status.RUNNING, Status.SUBMITTED):
852852
# TODO : save session ID in node
853-
if (node._nodeStatus.execMode == ExecMode.LOCAL):
853+
if node._nodeStatus.execMode == ExecMode.LOCAL:
854854
computingLocally = True
855-
elif (node._nodeStatus.execMode == ExecMode.EXTERN):
855+
elif node._nodeStatus.execMode == ExecMode.EXTERN:
856856
submitted = True
857857

858858
if self._computingLocally != computingLocally or self._submitted != submitted:

0 commit comments

Comments
 (0)