Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Check that match option is applied, even on files that have been passed in #112

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pep257.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,9 @@ def collect(names, match=lambda name: True, match_dir=lambda name: True):
for filename in filenames:
if match(filename):
yield os.path.join(root, filename)
else:
# Still need to check if the filename matches the passed in regex,
# since a non matching file could have passed in explicitly
elif match(os.path.basename(name)):
yield name


Expand Down