omni-us / jsonargparse

Implement minimal boilerplate CLIs derived from type hints and parse from command line, config files and environment variables
https://jsonargparse.readthedocs.io
MIT License
326 stars 49 forks source link

fix: empty tuples are correctly parsed #592

Closed MiguelMonteiro closed 1 month ago

MiguelMonteiro commented 1 month ago

What does this PR do?

Empty tuples are now successfully parsed.

Fixes #589

Before submitting

MiguelMonteiro commented 1 month ago

Thank you for the feedback, I have made the requested changes, let me know if it's correct.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (42d7a5c) to head (5a7d998). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #592 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 22 22 Lines 6453 6451 -2 ========================================= - Hits 6453 6451 -2 ``` | [Flag](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | Coverage Δ | | |---|---|---| | [py3.10](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `85.90% <ø> (-0.01%)` | :arrow_down: | | [py3.10_all](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `98.83% <ø> (-0.01%)` | :arrow_down: | | [py3.10_pydantic1](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `49.17% <ø> (+0.01%)` | :arrow_up: | | [py3.10_pydantic2](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `48.95% <ø> (+0.01%)` | :arrow_up: | | [py3.10_types](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `98.85% <ø> (-0.01%)` | :arrow_down: | | [py3.11](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `85.87% <ø> (-0.01%)` | :arrow_down: | | [py3.11_all](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `98.79% <ø> (-0.01%)` | :arrow_down: | | [py3.11_types](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `98.80% <ø> (-0.01%)` | :arrow_down: | | [py3.12](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `86.03% <ø> (-0.01%)` | :arrow_down: | | [py3.12_all](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `98.80% <ø> (-0.01%)` | :arrow_down: | | [py3.12_types](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `98.82% <ø> (-0.01%)` | :arrow_down: | | [py3.8](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `86.54% <ø> (-0.01%)` | :arrow_down: | | [py3.8_all](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `99.47% <ø> (-0.01%)` | :arrow_down: | | [py3.8_types](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `99.50% <ø> (-0.01%)` | :arrow_down: | | [py3.9](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `86.46% <ø> (-0.01%)` | :arrow_down: | | [py3.9_all](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `99.42% <ø> (-0.01%)` | :arrow_down: | | [py3.9_types](https://app.codecov.io/gh/omni-us/jsonargparse/pull/592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us) | `99.44% <ø> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=omni-us#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud