Skip to content

Commit 96e9acb

Browse files
committed
[core] Linting: Remove all trailing whitespaces
1 parent b86480a commit 96e9acb

File tree

4 files changed

+24
-22
lines changed

4 files changed

+24
-22
lines changed

bin/meshroom_compute

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ if args.node:
100100
# If running as "extern", the task is supposed to have the status SUBMITTED.
101101
# If not running as "extern", the SUBMITTED status should generate a warning.
102102
submittedStatuses.append(Status.SUBMITTED)
103-
103+
104104
if not node._chunksCreated:
105105
print(f"Error: Node {node} has been submitted before chunks have been created." \
106106
"See file: \"{node.nodeStatusFile}\".")
107107
sys.exit(-1)
108-
108+
109109
if node._isInputNode():
110110
print(f"InputNode: No computation to do.")
111111

meshroom/core/desc/computation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def toDict(self):
4747
"rangeFullSize": self.fullSize,
4848
"rangeBlocksCount": self.nbBlocks
4949
}
50-
50+
5151
def __repr__(self):
5252
return f"<Range {self.iteration}({self.blockSize})/{self.nbBlocks}({self.fullSize})>"
5353

meshroom/core/node.py

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def loadFromCache(self, statusFile):
181181
logging.warning(f"(loadFromCache) {self.nodeName}: Error while loading status file {statusFile}: {e}")
182182
self.reset()
183183

184-
@property
184+
@property
185185
def nbChunks(self):
186186
nbBlocks = self.chunks.nbBlocks if self.chunks else -1
187187
return nbBlocks
@@ -190,15 +190,15 @@ def getChunkRanges(self):
190190
if not self.chunks:
191191
return []
192192
ranges = []
193-
for i in range(self.chunks.nbBlocks):
193+
for i in range(self.chunks.nbBlocks):
194194
ranges.append(desc.Range(
195-
iteration=i,
196-
blockSize=self.chunks.blockSize,
197-
fullSize=self.chunks.fullSize,
195+
iteration=i,
196+
blockSize=self.chunks.blockSize,
197+
fullSize=self.chunks.fullSize,
198198
nbBlocks=self.chunks.nbBlocks
199199
))
200200
return ranges
201-
201+
202202
def setChunks(self, chunks):
203203
blockSize, fullSize, nbBlocks = 1, 1, 1
204204
for c in chunks:
@@ -215,7 +215,7 @@ class ChunkStatusData(BaseObject):
215215

216216
__slots__ = (
217217
"nodeName", "nodeType", "packageName", "packageVersion", "mrNodeType",
218-
"computeSessionUid", "execMode", "status", "graph", "commandLine", "env",
218+
"computeSessionUid", "execMode", "status", "graph", "commandLine", "env",
219219
"startDateTime", "endDateTime", "elapsedTime", "hostname"
220220
)
221221

@@ -274,7 +274,7 @@ def reset(self):
274274
self.mrNodeType: MrNodeType = MrNodeType.NONE
275275
self.execMode: ExecMode = ExecMode.NONE
276276
self.resetDynamicValues()
277-
277+
278278
def initStartCompute(self):
279279
import platform
280280
self.computeSessionUid = meshroom.core.sessionUid
@@ -510,12 +510,14 @@ def logger(self):
510510

511511
def getExecModeName(self):
512512
return self._status.execMode.name
513-
513+
514514
def shouldMonitorChanges(self):
515-
""" Check whether we should monitor changes in minimal mode
515+
"""
516+
Check whether we should monitor changes in minimal mode.
516517
Only chunks that are run externally or local_isolated should be monitored,
517518
when run locally, status changes are already notified.
518-
Chunks with an ERROR status may be re-submitted externally and should thus still be monitored
519+
Chunks with an ERROR status may be re-submitted externally and should thus still be
520+
monitored.
519521
"""
520522
return (self.isExtern() and self._status.status in (Status.SUBMITTED, Status.RUNNING, Status.ERROR)) or \
521523
(self.node.getMrNodeType() == MrNodeType.NODE and self._status.status in (Status.SUBMITTED, Status.RUNNING))
@@ -526,7 +528,7 @@ def updateStatusFromCache(self):
526528
"""
527529
# TODO : If this is a placeholder chunk
528530
# Then we shouldn't do anything here
529-
531+
530532
statusFile = self.getStatusFile()
531533
oldStatus = self._status.status
532534
# No status file => reset status to Status.None
@@ -831,7 +833,7 @@ def __init__(self, nodeType: str, position: Position = None, parent: BaseObject
831833
self._locked: bool = False
832834
self._duplicates = ListModel(parent=self) # list of nodes with the same uid
833835
self._hasDuplicates: bool = False
834-
836+
835837
self._nodeStatus: NodeStatusData = NodeStatusData(self._name, nodeType, self.packageName,
836838
self.packageVersion, self.getMrNodeType())
837839
self.nodeStatusFileLastModTime = -1
@@ -1521,9 +1523,9 @@ def sourceCodeFolder(self):
15211523
@property
15221524
def nodeStatusFile(self):
15231525
return os.path.join(self.graph.cacheDir, self.internalFolder, "nodeStatus")
1524-
1526+
15251527
def shouldMonitorChanges(self):
1526-
""" Check whether we should monitor changes in minimal mode
1528+
""" Check whether we should monitor changes in minimal mode.
15271529
Only chunks that are run externally or local_isolated should be monitored,
15281530
when run locally, status changes are already notified.
15291531
Chunks with an ERROR status may be re-submitted externally and should thus still be monitored
@@ -2203,7 +2205,7 @@ def toDict(self):
22032205
}
22042206

22052207
def _resetChunks(self):
2206-
""" Set chunks on the node
2208+
""" Set chunks on the node
22072209
# TODO : Maybe don't delete chunks if we will recreate them as before ?
22082210
"""
22092211
if isinstance(self.nodeDesc, desc.InputNode):
@@ -2242,7 +2244,7 @@ def _resetChunks(self):
22422244
self._chunksCreated = False
22432245
self.setSize(0)
22442246
self._chunks.setObjectList([])
2245-
# Create chunks when possible
2247+
# Create chunks when possible
22462248
self.chunksCreatedChanged.emit()
22472249
self.chunksChanged.emit()
22482250
self.globalStatusChanged.emit()

meshroom/core/submitter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def __repr__(self):
8282
# For all methods if If iteration is -1 then it kills all the tasks for the given node
8383

8484
def stopChunkTask(self, node, iteration):
85-
""" This will kill one task
85+
""" This will kill one task.
8686
If iteration is -1 then it kills all the tasks for the given node
8787
"""
8888
if self.submitterOptions.includes(SubmitterOptionsEnum.INTERRUPT_JOB):
@@ -233,7 +233,7 @@ def killRunningJob():
233233
killed by a user that don't want his machine to be used. Unfortunately this
234234
means jobs will be launched twice even if they failed for a good reason.
235235
This function can be used to make sure the current job will not restart
236-
Note : the ERROR_NO_RETRY itself won't do anything. This function must be
236+
Note : the ERROR_NO_RETRY itself won't do anything. This function must be
237237
implemented on a case-by-case for each possible farm system
238238
"""
239239
sys.exit(meshroom.MeshroomExitStatus.ERROR_NO_RETRY)

0 commit comments

Comments
 (0)