--- a/eric6/QScintilla/MiniEditor.py Wed Apr 21 19:40:50 2021 +0200 +++ b/eric6/QScintilla/MiniEditor.py Thu Apr 22 18:02:47 2021 +0200 @@ -2748,10 +2748,11 @@ """ self.__curFile = fileName - if not self.__curFile: - shownName = self.tr("Untitled") - else: - shownName = self.__strippedName(self.__curFile) + shownName = ( + self.tr("Untitled") + if not self.__curFile else + self.__strippedName(self.__curFile) + ) self.setWindowTitle(self.tr("{0}[*] - {1}") .format(shownName, self.tr("Mini Editor"))) @@ -3395,10 +3396,11 @@ self.__textEdit.SCN_STYLENEEDED.connect(self.__styleNeeded) # get the font for style 0 and set it as the default font - if pyname and pyname.startswith("Pygments|"): - key = 'Scintilla/Guessed/style0/font' - else: - key = 'Scintilla/{0}/style0/font'.format(self.lexer_.language()) + key = ( + 'Scintilla/Guessed/style0/font' + if pyname and pyname.startswith("Pygments|") else + 'Scintilla/{0}/style0/font'.format(self.lexer_.language()) + ) fdesc = Preferences.Prefs.settings.value(key) if fdesc is not None: font = QFont(fdesc[0], int(fdesc[1])) @@ -3545,10 +3547,11 @@ else: wc = re.sub(r'\w', "", wc) pattern = r"\b[\w{0}]+\b".format(re.escape(wc)) - if self.__textEdit.caseSensitive(): - rx = re.compile(pattern) - else: - rx = re.compile(pattern, re.IGNORECASE) + rx = ( + re.compile(pattern) + if self.__textEdit.caseSensitive() else + re.compile(pattern, re.IGNORECASE) + ) text = self.text(line) for match in rx.finditer(text):