fixed some warnings
This commit is contained in:
parent
85c3f49e1a
commit
6cadbe308f
@ -41,11 +41,14 @@ class MainWindow(QMainWindow):
|
||||
self.hide()
|
||||
|
||||
def del_tab(self, index: int):
|
||||
self.trades[self.main_widget.widget(index).unique_item].deleteLater()
|
||||
del self.trades[self.main_widget.widget(index).unique_item]
|
||||
collection = self.main_widget.widget(index)
|
||||
assert isinstance(collection, TradeCollection)
|
||||
self.trades[collection.unique_item].deleteLater()
|
||||
del self.trades[collection.unique_item]
|
||||
if not self.trades:
|
||||
self.hide()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
conf = config.read_config(r'config.yaml')
|
||||
compile_regex(conf)
|
||||
@ -53,7 +56,8 @@ if __name__ == "__main__":
|
||||
'listed for 18 chaos in Ritual (stash tab "$"; position: left 22, top 5)'
|
||||
text2 = '2021/03/08 23:24:52 17931875 bb3 [INFO Client 1492] @From NiceGuy: Hi, I would like to buy your level 21 23% Vaal Impurity of Lightning ' \
|
||||
'listed for 18 chaos in Ritual (stash tab "$"; position: left 22, top 5)'
|
||||
text3 = '2023/01/02 23:57:26 15123437 cffb0734 [INFO Client 16668] @From <SETSU?> LASTTRYPOEenjoyer: Hi, I would like to buy your Watcher\'s Eye, Prismatic Jewel listed for 2.5 divine in Sanctum (stash tab "$2"; position: left 8, top 7)'
|
||||
text3 = '2023/01/02 23:57:26 15123437 cffb0734 [INFO Client 16668] @From <SETSU?> LASTTRYPOEenjoyer: ' \
|
||||
'Hi, I would like to buy your Watcher\'s Eye, Prismatic Jewel listed for 2.5 divine in Sanctum (stash tab "$2"; position: left 8, top 7)'
|
||||
message = Message.from_text(text)
|
||||
message2 = Message.from_text(text2)
|
||||
message3 = Message.from_text(text3)
|
||||
@ -61,6 +65,9 @@ if __name__ == "__main__":
|
||||
app.setStyle('Material')
|
||||
|
||||
window = MainWindow()
|
||||
assert message
|
||||
assert message2
|
||||
assert message3
|
||||
window.new_trade(message)
|
||||
window.new_trade(message)
|
||||
window.new_trade(message2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user