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

Move const validator to post validators #1446

Merged
merged 1 commit into from Apr 30, 2020

Conversation

selimb
Copy link
Contributor

@selimb selimb commented Apr 27, 2020

Change Summary

Move const validator to post validators so that it validates the parsed value, not the input value.

Related issue number

Fixes #1410

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/changes/1410-selimb.md file added describing change
    (see changes/README.md for details)

@codecov
Copy link

codecov bot commented Apr 27, 2020

Codecov Report

Merging #1446 into master will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #1446   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         3747      3747           
  Branches       742       742           
=========================================
  Hits          3747      3747           
Impacted Files Coverage Δ
pydantic/fields.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

@selimb
Copy link
Contributor Author

selimb commented Apr 27, 2020

Let me know if you want something added to the docs. Wasn't sure how best to phrase it to stay consistent with the existing style.

@samuelcolvin samuelcolvin merged commit 881df8b into pydantic:master Apr 30, 2020
@samuelcolvin
Copy link
Member

thanks so much, I think this is what people would expect so no change to the docs required.

@selimb
Copy link
Contributor Author

selimb commented Apr 30, 2020

Yeah that's sorta what I figured. Welcome! Thanks again for this project. Cheers.

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.

Const validation applied before type validation/parsing
2 participants