Skip to content

Fix: List of union of classes not accepted by add_subclass_arguments in python>=3.11 #522

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

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

mauvilsa
Copy link
Member

@mauvilsa mauvilsa commented Jun 11, 2024

What does this PR do?

Fixes #456

Before submitting

  • Did you read the contributing guideline?
  • [n/a] 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 bug Something isn't working label Jun 11, 2024
@mauvilsa mauvilsa force-pushed the issue-456-add-subclass-list-of-union branch from 51db79e to 19c66bf Compare June 17, 2024 03:55
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

codecov bot commented Jun 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (1dd2664) to head (19c66bf).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #522   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         6188      6209   +21     
=========================================
+ Hits          6188      6209   +21     
Flag Coverage Δ
py3.10 87.40% <100.00%> (+0.04%) ⬆️
py3.10_all 98.64% <100.00%> (+<0.01%) ⬆️
py3.10_pydantic1 49.55% <48.38%> (+0.26%) ⬆️
py3.10_pydantic2 49.33% <48.38%> (+0.26%) ⬆️
py3.10_types 98.66% <100.00%> (+<0.01%) ⬆️
py3.11 87.38% <100.00%> (+0.04%) ⬆️
py3.11_all 98.64% <100.00%> (+<0.01%) ⬆️
py3.11_types 98.66% <100.00%> (+<0.01%) ⬆️
py3.12 87.53% <100.00%> (+0.04%) ⬆️
py3.12_all 98.64% <100.00%> (+<0.01%) ⬆️
py3.12_types 98.66% <100.00%> (+<0.01%) ⬆️
py3.7 87.91% <100.00%> (+0.04%) ⬆️
py3.7_all 99.22% <100.00%> (+<0.01%) ⬆️
py3.7_types 99.25% <100.00%> (+<0.01%) ⬆️
py3.8 88.09% <100.00%> (+0.04%) ⬆️
py3.8_all 99.38% <100.00%> (+<0.01%) ⬆️
py3.8_types 99.40% <100.00%> (+<0.01%) ⬆️
py3.9 87.94% <100.00%> (+0.04%) ⬆️
py3.9_all 99.27% <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.

@mauvilsa mauvilsa merged commit 890cd45 into main Jun 17, 2024
27 checks passed
@mauvilsa mauvilsa deleted the issue-456-add-subclass-list-of-union branch June 17, 2024 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In python 3.11, add_subclass_arguments with list[Class] is not working.
1 participant