Skip to content

Commit

Permalink
validator exception typo, fix #150 (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Jun 4, 2018
1 parent 3f53cb5 commit 9021d94
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
History
-------

v0.9.2 (2018-XX-XX)
...................
v0.10.0 (2018-XX-XX)
....................
* add ``Config.allow_population_by_alias`` #160, thanks @bendemaree
* **breaking change**: new errors format #179
* **breaking change**: removed ``Config.min_number_size`` and ``Config.max_number_size`` #183
* added error context and ability to redefine error message templates using ``Config.error_msg_templates`` #183
* fix typo in validator exception #150

v0.9.1 (2018-05-10)
...................
Expand Down
2 changes: 1 addition & 1 deletion pydantic/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def check_for_unused(self):
if unused_validators:
fn = ', '.join(unused_validators)
raise ConfigError(f"Validators defined with incorrect fields: {fn} "
f"(use check_fields=True if you're inheriting from the model and intended this)")
f"(use check_fields=False if you're inheriting from the model and intended this)")


def _extract_validators(namespace):
Expand Down
2 changes: 1 addition & 1 deletion pydantic/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

__all__ = ['VERSION']

VERSION = StrictVersion('0.9.1')
VERSION = StrictVersion('0.10.0')
2 changes: 1 addition & 1 deletion tests/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class Model(BaseModel):
def check_b(cls, v):
return v
assert str(exc_info.value) == ("Validators defined with incorrect fields: check_b "
"(use check_fields=True if you're inheriting from the model and intended this)")
"(use check_fields=False if you're inheriting from the model and intended this)")


def test_validate_parent():
Expand Down

0 comments on commit 9021d94

Please sign in to comment.