babel
babel copied to clipboard
Improve extract performance via ignoring directories early during os.walk
Closes #694 (rebases and reimplements it)
Codecov Report
Attention: Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.
Project coverage is 91.31%. Comparing base (
8e10fb5) to head (c68ca01).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| babel/messages/extract.py | 92.85% | 1 Missing :warning: |
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
| Flag | Coverage Δ | |
|---|---|---|
| macos-14-3.10 | 90.32% <92.85%> (-0.01%) |
:arrow_down: |
| macos-14-3.11 | 90.25% <92.85%> (-0.01%) |
:arrow_down: |
| macos-14-3.12 | 90.47% <92.85%> (-0.01%) |
:arrow_down: |
| macos-14-3.13 | 90.47% <92.85%> (-0.01%) |
:arrow_down: |
| macos-14-3.8 | 90.18% <92.85%> (-0.01%) |
:arrow_down: |
| macos-14-3.9 | 90.25% <92.85%> (-0.01%) |
:arrow_down: |
| macos-14-pypy3.10 | 90.32% <92.85%> (-0.01%) |
:arrow_down: |
| ubuntu-24.04-3.10 | 90.34% <92.85%> (-0.01%) |
:arrow_down: |
| ubuntu-24.04-3.11 | 90.28% <92.85%> (-0.01%) |
:arrow_down: |
| ubuntu-24.04-3.12 | 90.49% <92.85%> (-0.01%) |
:arrow_down: |
| ubuntu-24.04-3.13 | 90.49% <92.85%> (-0.01%) |
:arrow_down: |
| ubuntu-24.04-3.8 | 90.21% <92.85%> (-0.01%) |
:arrow_down: |
| ubuntu-24.04-3.9 | 90.27% <92.85%> (-0.01%) |
:arrow_down: |
| ubuntu-24.04-pypy3.10 | 90.34% <92.85%> (-0.01%) |
:arrow_down: |
| windows-2022-3.10 | 90.35% <92.85%> (-0.01%) |
:arrow_down: |
| windows-2022-3.11 | 90.29% <92.85%> (-0.01%) |
:arrow_down: |
| windows-2022-3.12 | 90.50% <92.85%> (-0.01%) |
:arrow_down: |
| windows-2022-3.13 | 90.50% <92.85%> (-0.01%) |
:arrow_down: |
| windows-2022-3.8 | 90.32% <92.85%> (-0.01%) |
:arrow_down: |
| windows-2022-3.9 | 90.28% <92.85%> (-0.01%) |
:arrow_down: |
| windows-2022-pypy3.10 | 90.35% <92.85%> (-0.01%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@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 - https://github.com/python-babel/babel/blob/373a52f0425d0af1e578e8562a8db93fc3a02488/babel/messages/frontend.py#L277-L288 - it seems to not need to create relative paths there, but maybe it's different. Possibly some logic could be combined or renamed to be consistent, but besides that, it seems like this should work.