Fix tests and drop unused function from NWTree class

This commit is contained in:
Veronica Berglyd Olsen
2022-04-23 17:05:29 +02:00
parent bd5a14b18e
commit 821833df8e
5 changed files with 24 additions and 38 deletions
-24
View File
@@ -351,30 +351,6 @@ class NWTree():
return True
##
# Getters
##
def countTypes(self):
"""Count the number of files, folders and roots in the project.
"""
nRoot = 0
nFolder = 0
nFile = 0
for tHandle in self._treeOrder:
tItem = self.__getitem__(tHandle)
if tItem is None:
continue
elif tItem.itemType == nwItemType.ROOT:
nRoot += 1
elif tItem.itemType == nwItemType.FOLDER:
nFolder += 1
elif tItem.itemType == nwItemType.FILE:
nFile += 1
return nRoot, nFolder, nFile
##
# Meta Methods
##