MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / __lt__

Method __lt__

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

Source from the content-addressed store, hash-verified

144
145 # inbox, sent, thrash first, rest alphabetically
146 def __lt__(self, other):
147 if (isinstance(other, Ui_FolderWidget)):
148 if self.folderName in self.folderWeight:
149 x = self.folderWeight[self.folderName]
150 else:
151 x = 99
152 if other.folderName in self.folderWeight:
153 y = self.folderWeight[other.folderName]
154 else:
155 y = 99
156 reverse = False
157 if self.treeWidget().header().sortIndicatorOrder() == QtCore.Qt.DescendingOrder:
158 reverse = True
159 if x == y:
160 return self.folderName < other.folderName
161 else:
162 return (x >= y if reverse else x < y)
163
164 return super(QtGui.QTreeWidgetItem, self).__lt__(other)
165
166
167class Ui_AddressWidget(QtGui.QTreeWidgetItem, AccountMixin, SettingsMixin):

Callers 4

__lt__Method · 0.45
__lt__Method · 0.45
__lt__Method · 0.45
__lt__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected