Improve PyQtFuture repr

This commit is contained in:
miruka 2019-05-10 20:46:07 -04:00
parent 7ff3448fed
commit 6051ba187a

View File

@ -26,7 +26,13 @@ class PyQtFuture(QObject):
def __repr__(self) -> str: def __repr__(self) -> str:
return "%s(%s)" % (type(self).__name__, repr(self.future)) state = ("canceled" if self.cancelled else
"running" if self.running else
"finished")
return "%s(state=%s, value=%r)" % (
type(self).__name__, state, self.value
)
@pyqtSlot() @pyqtSlot()