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

✨ Add callable that returns a model as a supported model type #333

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

zschumacher
Copy link
Owner

This PR fully implements the idea from #330 - rather than using overloads, we can simply union the model type and still infer the return type from the return type of the function when a callable is passed

@zschumacher
Copy link
Owner Author

closes #330

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (ba8152a) to head (d2fad84).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #333   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines          563       565    +2     
  Branches        41        41           
=========================================
+ Hits           563       565    +2     
Flag Coverage Δ
3.10-bigquery 71.15% <100.00%> (+0.10%) ⬆️
3.10-core 87.43% <100.00%> (+0.04%) ⬆️
3.10-mssql 72.03% <100.00%> (+0.09%) ⬆️
3.10-mysql 71.15% <100.00%> (+0.10%) ⬆️
3.10-oracle 71.15% <100.00%> (+0.10%) ⬆️
3.10-postgresql 86.54% <100.00%> (+0.04%) ⬆️
3.10-sqlite 70.79% <100.00%> (+0.10%) ⬆️
3.11-bigquery 71.15% <100.00%> (+0.10%) ⬆️
3.11-core 87.43% <100.00%> (+0.04%) ⬆️
3.11-mssql 72.03% <100.00%> (+0.09%) ⬆️
3.11-mysql 71.15% <100.00%> (+0.10%) ⬆️
3.11-oracle 71.15% <100.00%> (+0.10%) ⬆️
3.11-postgresql 86.54% <100.00%> (+0.04%) ⬆️
3.11-sqlite 70.79% <100.00%> (+0.10%) ⬆️
3.12-bigquery 71.15% <100.00%> (+0.10%) ⬆️
3.12-core 87.61% <100.00%> (+0.04%) ⬆️
3.12-mssql 72.03% <100.00%> (+0.09%) ⬆️
3.12-mysql 71.15% <100.00%> (+0.10%) ⬆️
3.12-oracle 71.15% <100.00%> (+0.10%) ⬆️
3.12-postgresql 86.72% <100.00%> (+0.04%) ⬆️
3.12-sqlite 70.79% <100.00%> (+0.10%) ⬆️
3.13-bigquery 71.15% <100.00%> (+0.10%) ⬆️
3.13-core 87.61% <100.00%> (+0.04%) ⬆️
3.13-mssql 72.03% <100.00%> (+0.09%) ⬆️
3.13-mysql 71.15% <100.00%> (+0.10%) ⬆️
3.13-oracle 71.15% <100.00%> (+0.10%) ⬆️
3.13-postgresql 86.72% <100.00%> (+0.04%) ⬆️
3.13-sqlite 70.79% <100.00%> (+0.10%) ⬆️
3.9-bigquery 71.22% <100.00%> (+0.10%) ⬆️
3.9-core 87.92% <100.00%> (+0.04%) ⬆️
3.9-mssql 72.11% <100.00%> (+0.09%) ⬆️
3.9-mysql 71.22% <100.00%> (+0.10%) ⬆️
3.9-oracle 71.22% <100.00%> (+0.10%) ⬆️
3.9-postgresql 86.67% <100.00%> (+0.04%) ⬆️
3.9-sqlite 70.87% <100.00%> (+0.10%) ⬆️

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.

@zschumacher zschumacher merged commit a085031 into main Jan 22, 2025
38 checks passed
@zschumacher zschumacher deleted the callable_as_type branch January 22, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant