Skip to content
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

fix: check_and_call_extract_file uses the first matching method and options, instead of the first matching method and last matching options #1121

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

jpmckinney
Copy link
Contributor

@jpmckinney jpmckinney commented Aug 21, 2024

Otherwise, if I want to use a different method for one file AND use options, I can't do, for example:

[myextractor: path/file.py]
myoption = myvalue

[python: path/**.py]

The current code will match path/file.py to myextractor, but it'll use the empty options from python...

Copy link
Member

@akx akx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but could you add a test for this? Thanks!

@jpmckinney
Copy link
Contributor Author

I would love to, but it's very hard to figure out where/how to test this. Basically, I'd need some scaffolding to be able to provide a configuration file, source files and a custom extractor and test whether the output is as expected.

@akx akx self-assigned this Oct 19, 2024
@akx akx force-pushed the jpmckinney-patch-1 branch from 62f4fd8 to b501949 Compare December 9, 2024 13:23
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.45%. Comparing base (cfdbc63) to head (4856358).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1121      +/-   ##
==========================================
+ Coverage   91.28%   91.45%   +0.17%     
==========================================
  Files          27       27              
  Lines        4624     4625       +1     
==========================================
+ Hits         4221     4230       +9     
+ Misses        403      395       -8     
Flag Coverage Δ
macos-14-3.10 90.22% <100.00%> (+0.17%) ⬆️
macos-14-3.11 90.16% <100.00%> (+0.17%) ⬆️
macos-14-3.12 90.37% <100.00%> (+0.17%) ⬆️
macos-14-3.13 90.37% <100.00%> (+0.17%) ⬆️
macos-14-3.8 90.15% <100.00%> (+0.17%) ⬆️
macos-14-3.9 90.15% <100.00%> (+0.17%) ⬆️
macos-14-pypy3.10 90.22% <100.00%> (+0.17%) ⬆️
ubuntu-24.04-3.10 90.24% <100.00%> (+0.17%) ⬆️
ubuntu-24.04-3.11 90.18% <100.00%> (+0.17%) ⬆️
ubuntu-24.04-3.12 90.40% <100.00%> (+0.17%) ⬆️
ubuntu-24.04-3.13 90.40% <100.00%> (+0.17%) ⬆️
ubuntu-24.04-3.8 90.17% <100.00%> (+0.17%) ⬆️
ubuntu-24.04-3.9 90.17% <100.00%> (+0.17%) ⬆️
ubuntu-24.04-pypy3.10 90.24% <100.00%> (+0.17%) ⬆️
windows-2022-3.10 90.36% <100.00%> (+0.17%) ⬆️
windows-2022-3.11 90.30% <100.00%> (+0.17%) ⬆️
windows-2022-3.12 90.51% <100.00%> (+0.17%) ⬆️
windows-2022-3.13 90.51% <100.00%> (+0.17%) ⬆️
windows-2022-3.8 90.29% <100.00%> (+0.17%) ⬆️
windows-2022-3.9 90.29% <100.00%> (+0.17%) ⬆️
windows-2022-pypy3.10 90.36% <100.00%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@akx akx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, work-work has been taking up resources...

I took the liberty of adding a test!

@akx akx enabled auto-merge (squash) December 9, 2024 13:27
jpmckinney and others added 2 commits December 9, 2024 15:47
…ptions, instead of the first matching method and last matching options
@akx akx force-pushed the jpmckinney-patch-1 branch from b501949 to 4856358 Compare December 9, 2024 13:48
@akx akx merged commit b3c105e into python-babel:master Dec 9, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants