Skip to content

Support implicit class_path when given a dict or single parameter #505

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 1 commit into from
May 21, 2024

Conversation

mauvilsa
Copy link
Member

What does this PR do?

Directly providing a dict with parameters or a single parameter to a subclass or callable with class return now implicitly tries using the base class as class_path if not abstract.

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 May 21, 2024
Copy link

codecov bot commented May 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (8c26223) to head (3e2198f).

Current head 3e2198f differs from pull request most recent head 3309ea4

Please upload reports for the commit 3309ea4 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #505   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         6128      6139   +11     
=========================================
+ Hits          6128      6139   +11     
Flag Coverage Δ
py3.10 87.27% <100.00%> (+0.02%) ⬆️
py3.10_all 98.64% <100.00%> (+<0.01%) ⬆️
py3.10_pydantic1 49.07% <41.66%> (-0.04%) ⬇️
py3.10_pydantic2 48.85% <41.66%> (-0.04%) ⬇️
py3.10_types 98.66% <100.00%> (+<0.01%) ⬆️
py3.11 87.26% <100.00%> (+0.02%) ⬆️
py3.11_all 98.64% <100.00%> (+<0.01%) ⬆️
py3.11_types 98.66% <100.00%> (+<0.01%) ⬆️
py3.12 87.40% <100.00%> (+0.02%) ⬆️
py3.12_all 98.64% <100.00%> (+<0.01%) ⬆️
py3.12_types 98.66% <100.00%> (+<0.01%) ⬆️
py3.7 87.82% <100.00%> (+0.02%) ⬆️
py3.7_all 99.26% <100.00%> (+<0.01%) ⬆️
py3.7_types 99.26% <100.00%> (+<0.01%) ⬆️
py3.8 87.99% <100.00%> (+0.02%) ⬆️
py3.8_all 99.41% <100.00%> (+<0.01%) ⬆️
py3.8_types 99.41% <100.00%> (+<0.01%) ⬆️
py3.9 87.82% <100.00%> (+0.02%) ⬆️
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.

…subclass or callable with class return now implicitly tries using the base class as class_path if not abstract.
@mauvilsa mauvilsa force-pushed the implicit-class-path branch from 3e2198f to 3309ea4 Compare May 21, 2024 05:30
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

@mauvilsa mauvilsa merged commit 797f004 into main May 21, 2024
25 checks passed
@mauvilsa mauvilsa deleted the implicit-class-path branch May 21, 2024 05:36
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.

1 participant