diff -r 8282a605d3f0 -r f6be97f4d96a src/eric7/UI/BrowserModel.py --- a/src/eric7/UI/BrowserModel.py Sat Jul 06 19:28:56 2024 +0200 +++ b/src/eric7/UI/BrowserModel.py Sat Jul 06 19:48:50 2024 +0200 @@ -1232,7 +1232,7 @@ (defaults to None) @type EricServerFileSystemInterface (optional) """ - BrowserItem.__init__(self, parent, text) + super().__init__(parent, text) self.__fsInterface = fsInterface @@ -1308,7 +1308,7 @@ ): return order == Qt.SortOrder.AscendingOrder - return BrowserItem.lessThan(self, other, column, order) + return super().lessThan(other, column, order) class BrowserDirectoryItem(BrowserItem): @@ -1338,7 +1338,7 @@ else: self._dirName = os.path.abspath(dinfo) dn = self._dirName if full else os.path.basename(self._dirName) - BrowserItem.__init__(self, parent, dn) + super().__init__(parent, dn) self.type_ = BrowserItemType.Directory if ( @@ -1409,7 +1409,7 @@ ): return order == Qt.SortOrder.AscendingOrder - return BrowserItem.lessThan(self, other, column, order) + return super().lessThan(other, column, order) class BrowserSysPathItem(BrowserItem): @@ -1424,7 +1424,7 @@ @param parent parent item @type BrowserItem """ - BrowserItem.__init__(self, parent, "sys.path") + super().__init__(parent, "sys.path") self.type_ = BrowserItemType.SysPath self.icon = EricPixmapCache.getIcon("filePython") @@ -1473,7 +1473,7 @@ self.fileext = os.path.splitext(finfo)[1].lower() self._filename = os.path.abspath(finfo) - BrowserItem.__init__(self, parent, basename) + super().__init__(parent, basename) self._dirName = dirname self.type_ = BrowserItemType.File @@ -1799,7 +1799,7 @@ if not sinit and oinit: return order == Qt.SortOrder.DescendingOrder - return BrowserItem.lessThan(self, other, column, order) + return super().lessThan(other, column, order) class BrowserClassItem(BrowserItem): @@ -1831,7 +1831,7 @@ supers.append(sname) name += "({0})".format(", ".join(supers)) - BrowserItem.__init__(self, parent, name) + super().__init__(parent, name) self.type_ = BrowserItemType.Class self._name = name @@ -1955,7 +1955,7 @@ else: return self.lineno() > other.lineno() - return BrowserItem.lessThan(self, other, column, order) + return super().lessThan(other, column, order) def isPublic(self): """ @@ -1984,7 +1984,7 @@ @type str """ name = fn.name - BrowserItem.__init__(self, parent, name) + super().__init__(parent, name) self.type_ = BrowserItemType.Method self._name = name @@ -2100,7 +2100,7 @@ else: return self.lineno() > other.lineno() - return BrowserItem.lessThan(self, other, column, order) + return super().lessThan(other, column, order) def isPublic(self): """ @@ -2130,7 +2130,7 @@ @param isClass flag indicating class attributes @type bool """ - BrowserItem.__init__(self, parent, text) + super().__init__(parent, text) self.type_ = BrowserItemType.Attributes self._attributes = attributes.copy() @@ -2187,7 +2187,7 @@ elif issubclass(other.__class__, (BrowserClassItem, BrowserMethodItem)): return order == Qt.SortOrder.AscendingOrder - return BrowserItem.lessThan(self, other, column, order) + return super().lessThan(other, column, order) class BrowserClassAttributeItem(BrowserItem): @@ -2206,7 +2206,7 @@ @param isClass flag indicating a class attribute @type bool """ - BrowserItem.__init__(self, parent, attribute.name) + super().__init__(parent, attribute.name) self.type_ = BrowserItemType.Attribute self._attributeObject = attribute @@ -2293,7 +2293,7 @@ else: return self.lineno() > other.lineno() - return BrowserItem.lessThan(self, other, column, order) + return super().lessThan(other, column, order) class BrowserGlobalsItem(BrowserClassAttributesItem): @@ -2331,7 +2331,7 @@ @param linenumber line number of the coding line @type int """ - BrowserItem.__init__(self, parent, text) + super().__init__(parent, text) self.type_ = BrowserItemType.Coding self.icon = EricPixmapCache.getIcon("textencoding") @@ -2366,7 +2366,7 @@ ): return order == Qt.SortOrder.AscendingOrder - return BrowserItem.lessThan(self, other, column, order) + return super().lessThan(other, column, order) class BrowserImportsItem(BrowserItem): @@ -2383,7 +2383,7 @@ @param text text to be shown by this item @type str """ - BrowserItem.__init__(self, parent, text) + super().__init__(parent, text) self.type_ = BrowserItemType.Imports self.icon = EricPixmapCache.getIcon("imports") @@ -2404,7 +2404,7 @@ if issubclass(other.__class__, (BrowserClassItem, BrowserClassAttributesItem)): return order == Qt.SortOrder.AscendingOrder - return BrowserItem.lessThan(self, other, column, order) + return super().lessThan(other, column, order) class BrowserImportItem(BrowserItem): @@ -2428,7 +2428,7 @@ @param isModule flag indicating a module item entry @type bool """ - BrowserItem.__init__(self, parent, text) + super().__init__(parent, text) self.__filename = filename self.__linenos = lineNumbers[:] @@ -2485,4 +2485,4 @@ else: return self.lineno() > other.lineno() - return BrowserItem.lessThan(self, other, column, order) + return super().lessThan(other, column, order)