pydivkit: allow expressions in div-collection-item-builder data

commit_hash:d0a816f90d27ee7814e22e975a46fbeb5ba7a798
This commit is contained in:
nikitin-artem
2025-09-12 13:21:49 +03:00
parent 0878b925db
commit e1388296d8
3 changed files with 6 additions and 3 deletions
@@ -187,6 +187,7 @@ BUILTIN_TYPES_TO_SCHEMA: Mapping[type, Mapping[str, Any]] = MappingProxyType(
str: MappingProxyType({"type": "string"}),
bytes: MappingProxyType({"type": "string"}),
Expr: MappingProxyType({"type": "string", "pattern": "^@{.*}$"}),
Any: MappingProxyType({}),
},
)
@@ -271,7 +272,7 @@ def _field_to_schema(
elif issubclass(type_, enum.Enum):
schema = _enum_to_schema(type_)
if not schema:
if schema is None:
raise TypeError(f"Schema building error for unknown type {type_}")
if field: