from typing import List
import attr
from yasoo import serialize
@attr.s
class Bar:
name = attr.ib()
type = attr.ib()
value = attr.ib()
@attr.s
class Foo:
bars = attr.ib(type=List[Bar])
serialize(Foo([Bar('a', 'b', 'c'), Bar('a', 'b', 'c')]))
TypeError: Найден объект типа "Бар", который нельзя сериализовать
Есть ли чистый обходной путь для этого ограничения?