mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-14 08:24:46 +00:00
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
This commit is contained in:
parent
d331558868
commit
4c797c9ff7
1 changed files with 1 additions and 1 deletions
|
|
@ -117,7 +117,7 @@ def filenames_from(arg, predicate=None):
|
||||||
for root, sub_directories, files in os.walk(arg):
|
for root, sub_directories, files in os.walk(arg):
|
||||||
for filename in files:
|
for filename in files:
|
||||||
joined = os.path.join(root, filename)
|
joined = os.path.join(root, filename)
|
||||||
if predicate(filename) or predicate(joined):
|
if predicate(joined):
|
||||||
continue
|
continue
|
||||||
yield joined
|
yield joined
|
||||||
# NOTE(sigmavirus24): os.walk() will skip a directory if you
|
# NOTE(sigmavirus24): os.walk() will skip a directory if you
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue