Fix flake8 errors
This commit is contained in:
@@ -32,6 +32,7 @@ def find_files_recursively(items, exclude_patterns):
|
|||||||
os.path.normpath(os.path.expanduser(pattern))
|
os.path.normpath(os.path.expanduser(pattern))
|
||||||
for pattern in exclude_patterns or ()
|
for pattern in exclude_patterns or ()
|
||||||
}
|
}
|
||||||
|
|
||||||
def is_excluded(path, exclude_patterns):
|
def is_excluded(path, exclude_patterns):
|
||||||
"""Return True if any pattern in exclude_patterns matches path."""
|
"""Return True if any pattern in exclude_patterns matches path."""
|
||||||
path = os.path.normpath(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 root, dirnames, filenames in os.walk(item, topdown=True):
|
||||||
for dirname in dirnames:
|
for dirname in dirnames:
|
||||||
if is_excluded(
|
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
|
dirnames.remove(dirname) # won't be visited later
|
||||||
for filename in (f for f in filenames
|
for filename in (f for f in filenames
|
||||||
if f.endswith(('.yml', '.yaml'))):
|
if f.endswith(('.yml', '.yaml'))):
|
||||||
|
|||||||
Reference in New Issue
Block a user