Use Ruff for linting and fix a ton of issues
This commit is contained in:
@@ -691,7 +691,7 @@ class _ReplacePage(NFixedPage):
|
||||
self.listBox.itemSelectionChanged.connect(self._onSelectionChanged)
|
||||
|
||||
for aKey, aVal in SHARED.project.data.autoReplace.items():
|
||||
newItem = QTreeWidgetItem(["<%s>" % aKey, aVal])
|
||||
newItem = QTreeWidgetItem([f"<{aKey}>", aVal])
|
||||
self.listBox.addTopLevelItem(newItem)
|
||||
|
||||
self.listBox.sortByColumn(self.C_KEY, Qt.SortOrder.AscendingOrder)
|
||||
|
||||
@@ -78,7 +78,7 @@ class GuiQuoteSelect(NDialog):
|
||||
|
||||
minSize = 100
|
||||
for sKey, sLabel in nwQuotes.SYMBOLS.items():
|
||||
text = "[ %s ] %s" % (sKey, trConst(sLabel))
|
||||
text = f"[ {sKey} ] {trConst(sLabel)}"
|
||||
minSize = max(minSize, metrics.boundingRect(text).width())
|
||||
qtItem = QListWidgetItem(text)
|
||||
qtItem.setData(self.D_KEY, sKey)
|
||||
|
||||
Reference in New Issue
Block a user