-
Notifications
You must be signed in to change notification settings - Fork 847
fix: traverse directories to allow pattern matching of files within them #259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: traverse directories to allow pattern matching of files within them #259
Conversation
@a3ng7n Thank you very much for your contribution |
awesome! I just saw that test failing; there was a dictionary access inside a formatted string - since the pre-commit formatter kept reverting the switch to |
Oops looks like I left some of the newer typing syntax in - I'll take care of it in the morning. |
I'm pretty sure it'll work now - tested locally on 3.8 and 3.12; hoping the versions in-between 'just work' |
just wanted to bump this - it should pass the ci unit tests now |
just pinging again - let me know if you'd like any help testing |
Thank you for your contribution. I really hope this PR gets approved.😭😭 |
Hey @cyclotruc , hoping you can review and merge, because |
I agree, I cannot really use the tool at all at the moment as I cannot figure out how to list files from subdirectory |
Hi folks, any reason this isn't merged? I tested it and it works well. |
repo is abandoned? |
Hi all — @hnykda, @RonanKMcGovern, @r6hk, and especially @a3ng7n, First, sincere apologies for the long silence. I (and @cyclotruc) let this PR sit far too long. Between a couple-week holiday, my PhD crunch, and @cyclotruc focusing on other work (see http://pad.ws), we simply failed to keep up. Explanation, not excuse — we’ll communicate better from here on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
Allows pattern matching to check against files within directories. Changes the logic of
_should_include
to traverse all directories such that pattern matching can happen to files within them. Also adds some logic to_process_node
to not include folders which have no children; i.e. when no files within them had passed the include/ignore filter.Also adds a few unit tests of some include/ignore patterns against the sample
temp_directory
.imo a more extensible solution would be to use glob, but that seemed like it'd require a more significant restructuring.
closes #224