diff options
| author | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-03-11 21:08:41 -0600 |
|---|---|---|
| committer | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-03-11 21:08:41 -0600 |
| commit | 4c797c9ff7300b39601943e841d98dcb3cb691e3 (patch) | |
| tree | 3792d641b01a78fa681c0f799905e3f369e21c8e | |
| parent | d331558868e7262948d169d322f044117eb871fd (diff) | |
| download | flake8-4c797c9ff7300b39601943e841d98dcb3cb691e3.tar.gz | |
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
| -rw-r--r-- | flake8/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
