-
Notifications
You must be signed in to change notification settings - Fork 452
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
Improve extract performance via ignoring directories early during os.walk #968
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #968 +/- ##
==========================================
- Coverage 91.31% 91.31% -0.01%
==========================================
Files 27 27
Lines 4653 4661 +8
==========================================
+ Hits 4249 4256 +7
- Misses 404 405 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@DenverCoder1 If you have a moment, could you review this? :) |
Looks good to me (I haven't tested) I noticed a similar method in frontend.py - babel/babel/messages/frontend.py Lines 277 to 288 in 373a52f
|
…walk Co-authored-by: Steven Kao <[email protected]>
@@ -111,10 +111,25 @@ def _strip(line: str): | |||
comments[:] = map(_strip, comments) | |||
|
|||
|
|||
def default_directory_filter(dirpath: str | os.PathLike[str]) -> bool: |
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.
Would this function be considered part of the public API? If so, shouldn't we deprecate it first?
|
||
for pattern, method in method_map: | ||
if method == "ignore" and pathmatch(pattern, dir_rel): | ||
return False |
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.
This line's missing test coverage ;)
Closes #694 (rebases and reimplements it)