Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pydantic/_internal/_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def collect_model_fields( # noqa: C901
if ann_name in cls_annotations or ann_name not in parent_fields_lookup:
# field is either:
# - present in the current model's annotations (and *not* from parent classes)
# - not found on any base classes; this seems to be caused by fields bot getting
# - not found on any base classes; this seems to be caused by fields not getting
# generated due to models not being fully defined while initializing recursive models.
# Nothing stops us from just creating a `FieldInfo` for this type hint, so we do this.
field_info = FieldInfo_.from_annotation(ann_type, _source=AnnotationSource.CLASS)
Expand Down
2 changes: 1 addition & 1 deletion pydantic/functional_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class PlainValidator:

def validate(v: object) -> int:
if not isinstance(v, (int, str)):
raise ValueError(f'Expected int or str, go {type(v)}')
raise ValueError(f'Expected int or str, got {type(v)}')

return int(v) + 1

Expand Down
Loading