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 type name to ValidationError error message #676

Merged
merged 5 commits into from
Aug 5, 2019

Conversation

dmontagu
Copy link
Contributor

@dmontagu dmontagu commented Jul 19, 2019

Change Summary

Make the string displayed for ValidationError contain the name of the model for easier debugging.

Related issue number

#677

Checklist

Codecov seems to be bugging out -- the "uncovered" lines were setting the value of compiled in main.py (I've marked the tests+coverage checkbox since I think it should be passing).

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • HISTORY.rst has been updated
    • if this is the first change since a release, please add a new section
    • include the issue number or this pull request number #<number>
    • include your github username @<whomever>

@codecov
Copy link

codecov bot commented Jul 19, 2019

Codecov Report

Merging #676 into master will decrease coverage by 0.07%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #676      +/-   ##
==========================================
- Coverage     100%   99.92%   -0.08%     
==========================================
  Files          15       15              
  Lines        2671     2672       +1     
  Branches      529      529              
==========================================
- Hits         2671     2670       -1     
- Misses          0        2       +2

@codecov
Copy link

codecov bot commented Jul 19, 2019

Codecov Report

Merging #676 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #676   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          15     15           
  Lines        2722   2727    +5     
  Branches      538    539    +1     
=====================================
+ Hits         2722   2727    +5

Copy link
Member

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

otherwise LGTM.

pydantic/error_wrappers.py Outdated Show resolved Hide resolved
pydantic/error_wrappers.py Outdated Show resolved Hide resolved
@dmontagu dmontagu force-pushed the type-in-validation-error branch from 9ac3b5d to 2cf7bf4 Compare July 23, 2019 19:03
pydantic/main.py Outdated Show resolved Hide resolved
pydantic/main.py Show resolved Hide resolved
@dmontagu dmontagu force-pushed the type-in-validation-error branch from 2cf7bf4 to 8135f47 Compare July 25, 2019 07:14
@samuelcolvin samuelcolvin merged commit 49178a3 into pydantic:master Aug 5, 2019
alexdrydew pushed a commit to alexdrydew/pydantic that referenced this pull request Dec 23, 2023
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