From 3175185a5232696fee7254f4780df179af5554d7 Mon Sep 17 00:00:00 2001 From: Alessandro Candido Date: Mon, 20 Mar 2023 21:21:52 +0100 Subject: [PATCH] Enhance generic lists deserialization --- src/eko/io/dictlike.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/eko/io/dictlike.py b/src/eko/io/dictlike.py index bea13097f..f606e4e27 100644 --- a/src/eko/io/dictlike.py +++ b/src/eko/io/dictlike.py @@ -197,6 +197,10 @@ def load_typing(type_, value): return None raise TypeError + if issubclass(origin, (list, typing.Generic)): + T = typing.get_args(type_)[0] + return origin([load_field(T, x) for x in value]) + return load_field(origin, value)