Skip to content
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

Adds improved matching for globs #134

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

scuml
Copy link

@scuml scuml commented Jan 29, 2025

Improves the matching mechanism for globs addressed in PR #92

This problem is solved with the new full_match method available in python 3.13. https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.full_match

To make the problem less severe in previous python versions, I made an improved version of fnmatch() that handles the most common */** pattern. (Using onlyfnmatch() does not select files on the top level making things feel very broken.) This way we can get the benefit of improved matching in older versions, without having to rely on an additional globber dependency.

Fixes:
#69
#91

@scuml
Copy link
Author

scuml commented Feb 5, 2025

How we feelin' about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant