Use Ruff for linting and fix a ton of issues

This commit is contained in:
Veronica Berglyd Olsen
2025-04-03 01:15:52 +02:00
parent d2796d27c3
commit 53a2d0e691
43 changed files with 257 additions and 235 deletions
+4 -4
View File
@@ -228,8 +228,8 @@ class GuiBuildSettings(NToolDialog):
"""
if self._build.changed:
response = SHARED.question(self.tr(
"Do you want to save your changes to '{0}'?".format(self._build.name)
))
"Do you want to save your changes to '{0}'?"
).format(self._build.name))
if response:
self._emitBuildData()
self._build.resetChangedState()
@@ -1168,11 +1168,11 @@ class _FormattingTab(NScrollableForm):
for key, name in nwLabels.PAPER_NAME.items():
self.pageSize.addItem(trConst(name), key)
self.pageWidth = NDoubleSpinBox(self, max=500.0)
self.pageWidth = NDoubleSpinBox(self, maxVal=500.0)
self.pageWidth.setFixedWidth(dbW)
self.pageWidth.valueChanged.connect(self._pageSizeValueChanged)
self.pageHeight = NDoubleSpinBox(self, max=500.0)
self.pageHeight = NDoubleSpinBox(self, maxVal=500.0)
self.pageHeight.setFixedWidth(dbW)
self.pageHeight.valueChanged.connect(self._pageSizeValueChanged)