Skip to content
Merged
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
6 changes: 5 additions & 1 deletion confection/_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,11 @@ def _make_unresolved_schema(
)
elif field.annotation is None:
fields[name] = (Any, Field(field.default))
elif issubclass(field.annotation, BaseModel):
elif (
# On Python 3.10, typing.* objects were not classes
isinstance(field.annotation, type)
and issubclass(field.annotation, BaseModel)
):
fields[name] = cls._make_unresolved_schema(
field.annotation, config[name]
)
Expand Down