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

Support for Protocol types only accepting exact matching signature of public methods #526

Merged
merged 4 commits into from
Jun 25, 2024

Conversation

mauvilsa
Copy link
Member

@mauvilsa mauvilsa commented Jun 13, 2024

What does this PR do?

Fixes #520

Before submitting

  • Did you read the contributing guideline?
  • Did you update the documentation? (readme and public docstrings)
  • Did you write unit tests such that there is 100% coverage on related code? (required for bug fixes and new features)
  • Did you verify that new and existing tests pass locally?
  • Did you make sure that all changes preserve backward compatibility?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

@mauvilsa mauvilsa added the enhancement New feature or request label Jun 13, 2024
jsonargparse/_typehints.py Fixed Show fixed Hide fixed
jsonargparse_tests/test_subclasses.py Fixed Show fixed Hide fixed
Copy link

codecov bot commented Jun 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (0525fd2) to head (f95eb27).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #526   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines         6381      6413   +32     
=========================================
+ Hits          6381      6413   +32     
Flag Coverage Δ
py3.10 85.66% <100.00%> (+0.07%) ⬆️
py3.10_all 98.68% <100.00%> (+<0.01%) ⬆️
py3.10_pydantic1 48.43% <36.58%> (-0.11%) ⬇️
py3.10_pydantic2 48.21% <36.58%> (-0.11%) ⬇️
py3.10_types 98.70% <100.00%> (+<0.01%) ⬆️
py3.11 85.64% <100.00%> (+0.07%) ⬆️
py3.11_all 98.68% <100.00%> (+<0.01%) ⬆️
py3.11_types 98.70% <100.00%> (+<0.01%) ⬆️
py3.12 85.79% <100.00%> (+0.07%) ⬆️
py3.12_all 98.68% <100.00%> (+<0.01%) ⬆️
py3.12_types 98.70% <100.00%> (+<0.01%) ⬆️
py3.7 86.12% <95.12%> (+0.05%) ⬆️
py3.7_all 99.21% <95.12%> (-0.02%) ⬇️
py3.7_types 99.26% <100.00%> (+<0.01%) ⬆️
py3.8 86.31% <95.12%> (+0.05%) ⬆️
py3.8_all 99.37% <95.12%> (-0.02%) ⬇️
py3.8_types 99.40% <100.00%> (+<0.01%) ⬆️
py3.9 86.19% <100.00%> (+0.06%) ⬆️
py3.9_all 99.28% <100.00%> (+<0.01%) ⬆️
py3.9_types 99.29% <100.00%> (+<0.01%) ⬆️

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.

jsonargparse_tests/test_subclasses.py Dismissed Show dismissed Hide dismissed
Copy link

@mauvilsa mauvilsa merged commit 0a4de31 into main Jun 25, 2024
26 checks passed
@mauvilsa mauvilsa deleted the issue-520-protocol branch June 25, 2024 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for typing.Protocol classes in CLI
1 participant