diff --git a/meshroom/core/desc/node.py b/meshroom/core/desc/node.py index a70053f8..b0b37b80 100644 --- a/meshroom/core/desc/node.py +++ b/meshroom/core/desc/node.py @@ -116,7 +116,7 @@ class Node(object): raise NotImplementedError('No stopProcess implementation on node: {}'.format(chunk.node.name)) def processChunk(self, chunk): - raise NotImplementedError('No processChunk implementation on node: "{}"'.format(chunk.node.name)) + raise NotImplementedError(f'No processChunk implementation on node: "{chunk.node.name}"') class InputNode(Node): diff --git a/meshroom/core/node.py b/meshroom/core/node.py index b5c49cc5..2d92ea3f 100644 --- a/meshroom/core/node.py +++ b/meshroom/core/node.py @@ -23,11 +23,11 @@ from meshroom.core.attribute import attributeFactory, ListAttribute, GroupAttrib from meshroom.core.exception import NodeUpgradeError, UnknownNodeTypeError -def getWritingFilepath(filepath): +def getWritingFilepath(filepath: str) -> str: return filepath + '.writing.' + str(uuid.uuid4()) -def renameWritingToFinalPath(writingFilepath, filepath): +def renameWritingToFinalPath(writingFilepath: str, filepath: str) -> str: if platform.system() == 'Windows': # On Windows, attempting to remove a file that is in use causes an exception to be raised. # So we may need multiple trials, if someone is reading it at the same time. @@ -1061,7 +1061,7 @@ class BaseNode(BaseObject): s = self.globalStatus for chunk in self._chunks: chunk.updateStatusFromCache() - # logging.warning("updateStatusFromCache: {}, status: {} => {}".format(self.name, s, self.globalStatus)) + # logging.warning(f"updateStatusFromCache: {self.name}, status: {s} => {self.globalStatus}") self.updateOutputAttr() def submit(self, forceCompute=False): diff --git a/meshroom/ui/reconstruction.py b/meshroom/ui/reconstruction.py index c96edfb1..93b7bb73 100755 --- a/meshroom/ui/reconstruction.py +++ b/meshroom/ui/reconstruction.py @@ -12,10 +12,14 @@ from PySide6.QtGui import QMatrix4x4, QMatrix3x3, QQuaternion, QVector3D, QVecto import meshroom.core import meshroom.common + from meshroom import multiview from meshroom.common.qt import QObjectListModel from meshroom.core import Version from meshroom.core.node import Node, CompatibilityNode, Status, Position, CompatibilityIssue +from meshroom.core.taskManager import TaskManager + +from meshroom.ui import commands from meshroom.ui.graph import UIGraph from meshroom.ui.utils import makeProperty from meshroom.ui.components.filepath import FilepathHelper @@ -450,7 +454,7 @@ class Reconstruction(UIGraph): "matchProvider": ["FeatureMatching", "StructureFromMotion"] } - def __init__(self, undoStack, taskManager, defaultPipeline="", parent=None): + def __init__(self, undoStack: commands.UndoStack, taskManager: TaskManager, defaultPipeline: str="", parent: QObject=None): super(Reconstruction, self).__init__(undoStack, taskManager, parent) # initialize member variables for key steps of the 3D reconstruction pipeline