--- a/eric6/Preferences/ProgramsDialog.py Fri Apr 02 11:59:41 2021 +0200 +++ b/eric6/Preferences/ProgramsDialog.py Sat May 01 14:27:20 2021 +0200 @@ -37,7 +37,7 @@ @param parent The parent widget of this dialog. (QWidget) """ - super(ProgramsDialog, self).__init__(parent) + super().__init__(parent) self.setupUi(self) self.setObjectName("ProgramsDialog") self.setWindowFlags(Qt.WindowType.Window) @@ -357,10 +357,11 @@ """ itmList = self.programsList.findItems( description, Qt.MatchFlag.MatchCaseSensitive) - if itmList: - itm = itmList[0] - else: - itm = QTreeWidgetItem(self.programsList, [description]) + itm = ( + itmList[0] + if itmList else + QTreeWidgetItem(self.programsList, [description]) + ) font = itm.font(0) font.setBold(True) itm.setFont(0, font)