[python27] fix compatibility issues

This commit is contained in:
Yann Lanthony 2017-10-06 15:45:39 +02:00
parent 2ba1278ee8
commit b8eff927cc
2 changed files with 8 additions and 5 deletions

4
meshroom/processGraph/desc.py Normal file → Executable file
View file

@ -1,5 +1,5 @@
class Attribute:
class Attribute(object):
"""
"""
isOutput = False
@ -26,7 +26,7 @@ class ParamAttribute(Attribute):
super(ParamAttribute, self).__init__(**kwargs)
class Node:
class Node(object):
"""
"""
internalFolder = '{nodeType}/{uid0}/'

View file

@ -21,10 +21,12 @@ class UndoCommand(QUndoCommand):
return
self.undoImpl()
def redoImpl(self) -> bool:
def redoImpl(self):
# type: () -> bool
pass
def undoImpl(self) -> bool:
def undoImpl(self):
# type: () -> bool
pass
@ -38,7 +40,8 @@ class UndoStack(QUndoStack):
self.undoTextChanged.connect(self._undoTextChanged)
self.redoTextChanged.connect(self._redoTextChanged)
def tryAndPush(self, command: UndoCommand):
def tryAndPush(self, command):
# type: (UndoCommand) -> bool
if command.redoImpl():
command.setEnabled(False)
self.push(command) # takes ownership