--- a/src/eric7/MicroPython/IgnoredDevicesDialog.py Wed Jul 13 11:16:20 2022 +0200 +++ b/src/eric7/MicroPython/IgnoredDevicesDialog.py Wed Jul 13 14:55:47 2022 +0200 @@ -16,10 +16,11 @@ """ Class implementing a dialog to manage the list of ignored serial devices. """ + def __init__(self, deviceList, parent=None): """ Constructor - + @param deviceList list of ignored serial devices given by VID and PID @type list of tuple of (int, int) @param parent reference to the parent widget @@ -27,19 +28,21 @@ """ super().__init__(parent) self.setupUi(self) - - self.devicesEditWidget.setList([ - "{0} ({1:04x}/{2:04x})".format(description, vid, pid) - for vid, pid, description in deviceList - ]) - + + self.devicesEditWidget.setList( + [ + "{0} ({1:04x}/{2:04x})".format(description, vid, pid) + for vid, pid, description in deviceList + ] + ) + self.devicesEditWidget.setDefaultVisible(False) self.devicesEditWidget.setAddVisible(False) - + def getDevices(self): """ Public method to get the list of ignored serial devices. - + @return list of tuples containing the VID, PID and a description of each ignored device @rtype list of tuple of (int, int, str) @@ -50,5 +53,5 @@ description, vid_pid = entry.rsplit(None, 1) vid, pid = vid_pid[1:-1].split("/", 1) deviceList.append((int(vid, 16), int(pid, 16), description)) - + return deviceList