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 _ignored argument to SchemaValidator #822

Closed
wants to merge 2 commits into from

Conversation

Kludex
Copy link
Member

@Kludex Kludex commented Jul 25, 2023

Change Summary

This PR adds a new _ignored keyword argument to the SchemaValidator. The goal is to have a key that is going to be ignored, and it will allow compatibility with the logic implemented in pydantic/pydantic#6820.

Related issue number

Checklist

  • Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

@Kludex Kludex requested a review from davidhewitt July 25, 2023 14:57
@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Merging #822 (54b8915) into main (f5ef7af) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #822   +/-   ##
=======================================
  Coverage   93.48%   93.48%           
=======================================
  Files         102      102           
  Lines       14606    14606           
  Branches       25       25           
=======================================
  Hits        13655    13655           
  Misses        945      945           
  Partials        6        6           
Files Changed Coverage Δ
src/url.rs 98.30% <100.00%> (ø)
src/validators/mod.rs 97.73% <100.00%> (ø)

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 f5ef7af...54b8915. Read the comment docs.

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 25, 2023

CodSpeed Performance Report

Merging #822 will not alter performance

Comparing feat/add-_ignored-keyword (54b8915) with main (f5ef7af)

Summary

✅ 135 untouched benchmarks

@davidhewitt
Copy link
Contributor

Is there a reason we need to store this in the Rust type? Could PluggableSchemaValidator just save this field in __init__?

@Kludex
Copy link
Member Author

Kludex commented Jul 25, 2023

Ok. This is not needed! 👀

Thanks @davidhewitt :)

@Kludex Kludex closed this Jul 25, 2023
@Kludex Kludex deleted the feat/add-_ignored-keyword branch July 25, 2023 15:32
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.

2 participants