Skip to content

Match adjacent wildcards in extraction mappings - #1512

Open
Divuzki wants to merge 1 commit into
python-babel:masterfrom
Divuzki:fix-adjacent-extraction-wildcards
Open

Divuzki wants to merge 1 commit into
python-babel:masterfrom
Divuzki:fix-adjacent-extraction-wildcards

Conversation

@Divuzki

@Divuzki Divuzki commented Nov 28, 2026

Copy link
Copy Markdown

A mapping such as [python: locale/??/messages.py] aborts extraction with KeyError: '??/'. pathmatch looks up the whole run of wildcards as one symbol. Split the pattern at individual wildcard tokens, keeping **/ together so it still matches across directory levels.

Five regression cases failed before the change. All 67 tests in the utility, utility doctest, extraction, and Python extractor selections passed afterward. A directory extraction with the mapping above picked up en and fr and skipped eng.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant