@@ -471,18 +471,23 @@ def __init__(self) -> None:
471471 annotations = {}
472472 object_info_data = {}
473473
474- for k , v in data .items ():
475- if isinstance (v , dict ):
476- v = convert_dict_to_object_info (v )
477- type_v = type (v )
478- elif isinstance (v , Iterable ) and not isinstance (v , str ):
479- v = [convert_dict_to_object_info (item ) for item in v ]
480- type_v = List [Any ]
481- else :
482- type_v = type (v )
474+ if isinstance (data , dict ):
475+ for k , v in data .items ():
476+ if isinstance (v , dict ):
477+ v = convert_dict_to_object_info (v )
478+ type_v = type (v )
479+ elif isinstance (v , (list , tuple , set )):
480+ v = convert_dict_to_object_info (v )
481+ type_v = List [Any ]
482+ else :
483+ type_v = type (v )
483484
484- annotations [k ] = type_v
485- object_info_data [k ] = v
485+ annotations [k ] = type_v
486+ object_info_data [k ] = v
486487
487- DictView .__init__ .__annotations__ = annotations
488- return ObjectInfo (DictView , object_info_data )
488+ DictView .__init__ .__annotations__ = annotations
489+ return ObjectInfo (DictView , object_info_data )
490+ elif isinstance (data , (list , tuple , set )):
491+ return [convert_dict_to_object_info (x ) for x in data ]
492+ else :
493+ return data
0 commit comments