mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 18:56:53 +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 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue