diff -r fcb6b4b96274 -r 78e6d29eb773 eric6/UI/BrowserModel.py --- a/eric6/UI/BrowserModel.py Tue Apr 13 18:02:59 2021 +0200 +++ b/eric6/UI/BrowserModel.py Tue Apr 13 19:59:17 2021 +0200 @@ -76,10 +76,8 @@ if parent is None: parent = QModelIndex() - if parent.isValid(): - item = parent.internalPointer() - else: - item = self.rootItem + item = (parent.internalPointer() if parent.isValid() + else self.rootItem) return item.columnCount() + 1 @@ -1044,12 +1042,7 @@ @param full flag indicating full pathname should be displayed (boolean) """ self._dirName = os.path.abspath(dinfo) - - if full: - dn = self._dirName - else: - dn = os.path.basename(self._dirName) - + dn = self._dirName if full else os.path.basename(self._dirName) BrowserItem.__init__(self, parent, dn) self.type_ = BrowserItemDirectory @@ -1073,11 +1066,7 @@ @param full flag indicating full pathname should be displayed (boolean) """ self._dirName = os.path.abspath(dinfo) - - if full: - dn = self._dirName - else: - dn = os.path.basename(self._dirName) + dn = self._dirName if full else os.path.basename(self._dirName) self.itemData[0] = dn def dirName(self):