1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

Added tox configuration

... and fixed pep8 warnings. There's a lot of them that are still
ignored, but that's because it's too much of a step to take at once.
This commit is contained in:
Virgil Dupras
2014-10-13 15:08:59 -04:00
parent 24643a9b5d
commit 2166a0996c
46 changed files with 794 additions and 612 deletions

View File

@@ -62,10 +62,10 @@ class Directories:
return True
return False
def __delitem__(self,key):
def __delitem__(self, key):
self._dirs.__delitem__(key)
def __getitem__(self,key):
def __getitem__(self, key):
return self._dirs.__getitem__(key)
def __len__(self):
@@ -95,7 +95,8 @@ class Directories:
file.is_ref = state == DirectoryState.Reference
filepaths.add(file.path)
yield file
# it's possible that a folder (bundle) gets into the file list. in that case, we don't want to recurse into it
# it's possible that a folder (bundle) gets into the file list. in that case, we don't
# want to recurse into it
subfolders = [p for p in from_path.listdir() if not p.islink() and p.isdir() and p not in filepaths]
for subfolder in subfolders:
for file in self._get_files(subfolder, j):
@@ -144,7 +145,7 @@ class Directories:
"""
try:
subpaths = [p for p in path.listdir() if p.isdir()]
subpaths.sort(key=lambda x:x.name.lower())
subpaths.sort(key=lambda x: x.name.lower())
return subpaths
except EnvironmentError:
return []