Fixed flake8 W and F errors

This commit is contained in:
Veronica K. B. Olsen
2020-08-12 21:41:37 +02:00
parent 72cb1ed60f
commit 00f0a6887c
22 changed files with 41 additions and 72 deletions
+1 -3
View File
@@ -475,7 +475,6 @@ class GuiProjectTree(QTreeWidget):
tName = nwItem.itemName
tClass = nwItem.itemClass
tHandle = nwItem.itemHandle
pHandle = nwItem.parHandle
expIcon = QIcon()
@@ -670,7 +669,6 @@ class GuiProjectTree(QTreeWidget):
isNote = snItem.itemLayout == nwItemLayout.NOTE
onFile = dnItem.itemType == nwItemType.FILE
isRoot = snItem.itemType == nwItemType.ROOT
onRoot = dnItem.itemType == nwItemType.ROOT
isOnTop = self.dropIndicatorPosition() == QAbstractItemView.OnItem
if (isSame or isNone or isNote) and not (onFile and isOnTop) and not isRoot:
logger.debug("Drag'n'drop of item %s accepted" % sHandle)
@@ -758,7 +756,7 @@ class GuiProjectTree(QTreeWidget):
byIndex = self.theMap[pHandle].indexOfChild(self.theMap[nHandle])
except Exception:
logger.error("Failed to get index of item with handle %s" % nHandle)
if byIndex >= 0:
if byIndex >= 0:
self.theMap[pHandle].insertChild(byIndex+1, newItem)
else:
self.theMap[pHandle].addChild(newItem)