MCPcopy
hub / github.com/pydantic/pydantic / values_are_not_string

Method values_are_not_string

tests/test_validators.py:1869–1872  ·  view source on GitHub ↗
(cls, values: dict[str, Any])

Source from the content-addressed store, hash-verified

1867
1868 @root_validator(pre=True)
1869 def values_are_not_string(cls, values: dict[str, Any]) -> dict[str, Any]:
1870 if any(isinstance(x, str) for x in values.values()):
1871 raise ValueError('values cannot be a string')
1872 return values
1873
1874 m = Model(current=100, max_value=200)
1875 with pytest.raises(ValidationError) as exc_info:

Callers

nothing calls this directly

Calls 1

valuesMethod · 0.80

Tested by

no test coverage detected