Enable following symbolic links when traversing a directory#1212
Open
jmoraleda wants to merge 4 commits intopython-babel:masterfrom
Open
Enable following symbolic links when traversing a directory#1212jmoraleda wants to merge 4 commits intopython-babel:masterfrom
jmoraleda wants to merge 4 commits intopython-babel:masterfrom
Conversation
…n traversing a directory
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for following symbolic links when traversing directories during message extraction, addressing a missing feature. Key changes include:
- A new CLI test to verify the --follow-links option.
- Documentation updates for the CLI to inform users about the follow-links flag.
- Code modifications in both the frontend and extraction modules to enable following symbolic links.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/messages/test_frontend.py | Adds a test case for the follow-links CLI option. |
| docs/cmdline.rst | Updates CLI documentation to include the follow-links flag. |
| babel/messages/frontend.py | Adds follow-links as a command-line option and initializes its value. |
| babel/messages/extract.py | Passes the follow-links parameter to os.walk in extract_from_dir. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1212 +/- ##
==========================================
+ Coverage 91.71% 91.98% +0.27%
==========================================
Files 27 27
Lines 4685 4694 +9
==========================================
+ Hits 4297 4318 +21
+ Misses 388 376 -12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds an option to
extract_from_dirandfrontendto follow symbolic links when traversing a directory. This was a missing feature. The rationale for it is in the issue description and comments: #1211 (comment)Fixes #1211