-
Notifications
You must be signed in to change notification settings - Fork 24k
Improve fileglob lookup - Pattern matching on directory & file #83600
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
base: devel
Are you sure you want to change the base?
Conversation
The test
The test
The test
The test
|
* Replace os.path by Pathlib library & refactor * Add new feature : Pattern matching on directory & file * Add new integration test for cover new feature
d6a70ab
to
be6e985
Compare
For Windows path, there is a difference between `str(p)` & `p.as_posix()`
Seems correct, I did a review during pycon.fr with submitter and @pilou- The behavior did seems curious, but that was the original one, so I would say LGTM. |
SUMMARY
Hi, I modify and improve
fileglob
lookup for adding pattern matching to folder and keeping the previous behaviors.I made this change because I think it's a shame that this lookup doesn't have these features and that it's laborious to get the same behavior by other means.
I replace
os.path
library byPathlib
because it's a better library for manipulate filesystem paths. This library was added in Python 3.4. I add new integration test and examples for cover this new features. I run sanity and integration test forfileglob
, there are no errors.I welcome any feedback to improve this PR. Thanks.
ISSUE TYPE