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

Don't warn on missing fields if exclude_* are used #727

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

adriangb
Copy link
Member

@adriangb adriangb commented Jul 2, 2023

Fixes pydantic/pydantic#6357

Selected Reviewer: @davidhewitt

@adriangb
Copy link
Member Author

adriangb commented Jul 2, 2023

please review

@codecov
Copy link

codecov bot commented Jul 2, 2023

Codecov Report

Merging #727 (ea44bb3) into main (0d12efd) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #727   +/-   ##
=======================================
  Coverage   93.63%   93.63%           
=======================================
  Files          99       99           
  Lines       13911    13913    +2     
  Branches       25       25           
=======================================
+ Hits        13026    13028    +2     
  Misses        879      879           
  Partials        6        6           
Impacted Files Coverage Δ
src/serializers/fields.rs 94.49% <100.00%> (+0.05%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d12efd...ea44bb3. Read the comment docs.

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 2, 2023

CodSpeed Performance Report

Merging #727 will not alter performances

Comparing dont-warn-exclude-default (ea44bb3) with main (0d12efd)

Summary

✅ 125 untouched benchmarks

Copy link
Contributor

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the future, it seems to be it would be most precise if the serializer was able to compute the set of fields which are expected (after reviewing defaults and unset values). However this would be a much more involved change which isn't necessary right now given that this is a sanity check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect user warnings
2 participants