diff --git a/novelwriter/dialogs/about.py b/novelwriter/dialogs/about.py index d9f89f3c..5ffd25c0 100644 --- a/novelwriter/dialogs/about.py +++ b/novelwriter/dialogs/about.py @@ -251,7 +251,7 @@ class GuiAbout(QDialog): return def _wrapTable(self, theData): - """Wrap a list of label/value tuples in a html table. + """Wrap a list of label/value tuples in an html table. """ theTable = [] for aLabel, aValue in theData: diff --git a/novelwriter/dialogs/docsplit.py b/novelwriter/dialogs/docsplit.py index 8d6002d6..a8767784 100644 --- a/novelwriter/dialogs/docsplit.py +++ b/novelwriter/dialogs/docsplit.py @@ -142,9 +142,7 @@ class GuiDocSplit(QDialog): theText = "" nLines = len(self.sourceText) - logger.debug( - "Splitting document %s with %d lines" % (self.sourceItem, nLines) - ) + logger.debug("Splitting document %s with %d lines", self.sourceItem, nLines) finalOrder = [] for i in range(self.listBox.count()): @@ -177,7 +175,8 @@ class GuiDocSplit(QDialog): "{0}

{1}".format( self.tr( "The document will be split into {0} file(s) in a new folder. " - "The original document will remain intact.").format(nFiles), + "The original document will remain intact." + ).format(nFiles), self.tr( "Continue with the splitting process?" ) @@ -199,9 +198,7 @@ class GuiDocSplit(QDialog): isNovel = srcItem.itemClass == nwItemClass.NOVEL itemLayout = nwItemLayout.DOCUMENT if isNovel else nwItemLayout.NOTE - wTitle = wTitle.lstrip("#") - wTitle = wTitle.strip() - + wTitle = wTitle.lstrip("#").strip() nHandle = self.theProject.newFile(wTitle, srcItem.itemClass, fHandle) newItem = self.theProject.projTree[nHandle] newItem.setLayout(itemLayout) diff --git a/novelwriter/dialogs/projsettings.py b/novelwriter/dialogs/projsettings.py index b79cc69a..ad98517e 100644 --- a/novelwriter/dialogs/projsettings.py +++ b/novelwriter/dialogs/projsettings.py @@ -279,8 +279,7 @@ class GuiProjectEditStatus(QWidget): self.listBox = QTreeWidget() self.listBox.setHeaderLabels([ - self.tr("Label"), - self.tr("Usage"), + self.tr("Label"), self.tr("Usage"), ]) self.listBox.itemSelectionChanged.connect(self._selectedItem) self.listBox.setColumnWidth(self.COL_LABEL, wCol0) @@ -551,7 +550,7 @@ class GuiProjectEditReplace(QWidget): self.editValue.setEnabled(False) self.editValue.setMaxLength(80) - self.saveButton = QPushButton("Save") + self.saveButton = QPushButton(self.tr("Save")) self.saveButton.setToolTip(self.tr("Save entry")) self.saveButton.clicked.connect(self._saveEntry)