Repository navigation
Conversation
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:
|
Add a `follow_links` parameter to `extract_from_dir` and a `--follow-links` option to `pybabel extract`, passed through to `os.walk(followlinks=...)`. Symbolic links are not followed by default. Fixes python-babel#1211 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Rebased onto current master. The option is now long-only ( |
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