From 4c797c9ff7300b39601943e841d98dcb3cb691e3 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Fri, 11 Mar 2016 21:08:41 -0600 Subject: [PATCH] Simplify how we check if a file is excluded Our typical usage always passes is_path_excluded which checks the basename and the full path --- flake8/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake8/utils.py b/flake8/utils.py index 7e08e41..1ceb76f 100644 --- a/flake8/utils.py +++ b/flake8/utils.py @@ -117,7 +117,7 @@ def filenames_from(arg, predicate=None): for root, sub_directories, files in os.walk(arg): for filename in files: joined = os.path.join(root, filename) - if predicate(filename) or predicate(joined): + if predicate(joined): continue yield joined # NOTE(sigmavirus24): os.walk() will skip a directory if you