MCPcopy Create free account
hub / github.com/Bitmessage/PyBitmessage / __lt__

Method __lt__

src/bitmessageqt/foldertree.py:466–475  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

464 return super(Ui_AddressBookWidgetItem, self).setData(role, value)
465
466 def __lt__ (self, other):
467 if (isinstance(other, Ui_AddressBookWidgetItem)):
468 reverse = False
469 if self.tableWidget().horizontalHeader().sortIndicatorOrder() == QtCore.Qt.DescendingOrder:
470 reverse = True
471 if self.type == other.type:
472 return self.label.lower() < other.label.lower()
473 else:
474 return (not reverse if self.type < other.type else reverse)
475 return super(QtGui.QTableWidgetItem, self).__lt__(other)
476
477
478class Ui_AddressBookWidgetItemLabel(Ui_AddressBookWidgetItem):

Callers

nothing calls this directly

Calls 1

__lt__Method · 0.45

Tested by

no test coverage detected