Fix flake8 errors

pull/50/head
sedrubal 8 years ago
parent 653142eb20
commit caa8859177
No known key found for this signature in database
GPG Key ID: B83D4C8CEB8ABFF6

@ -32,6 +32,7 @@ def find_files_recursively(items, exclude_patterns):
os.path.normpath(os.path.expanduser(pattern))
for pattern in exclude_patterns or ()
}
def is_excluded(path, exclude_patterns):
"""Return True if any pattern in exclude_patterns matches path."""
path = os.path.normpath(path)
@ -46,7 +47,7 @@ def find_files_recursively(items, exclude_patterns):
for root, dirnames, filenames in os.walk(item, topdown=True):
for dirname in dirnames:
if is_excluded(
os.path.join(root, dirname), exclude_patterns):
os.path.join(root, dirname), exclude_patterns):
dirnames.remove(dirname) # won't be visited later
for filename in (f for f in filenames
if f.endswith(('.yml', '.yaml'))):

Loading…
Cancel
Save