-
-
Notifications
You must be signed in to change notification settings - Fork 13
Adds improved matching for globs #134
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
Conversation
for more information, see https://pre-commit.ci
…watchfiles into full_match-support
for more information, see https://pre-commit.ci
…watchfiles into full_match-support
for more information, see https://pre-commit.ci
This comment was marked as spam.
This comment was marked as spam.
|
Thank you for starting this one @scuml . I have just merged a version of it in #166, with you as co-author. I opted to avoid the I did try to backport everything necessary to make |
|
That's the right call. Behavior too unpredictable otherwise. |

Improves the matching mechanism for globs addressed in PR #92
This problem is solved with the new
full_matchmethod available in python 3.13. https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.full_matchTo 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 additionalglobberdependency.Fixes:
#69
#91