Fix: typo in dict processing

Summary:
David had his code crashed when using frame_annot["meta"] dictionary. Turns out we had a typo.
The tests were passing by chance since all the keys were single-character strings.

Reviewed By: bottler

Differential Revision: D37503987

fbshipit-source-id: c12b0df21116cfbbc4675a0182b9b9e6d62bad2e
This commit is contained in:
Roman Shapovalov
2022-06-28 16:11:49 -07:00
committed by Facebook GitHub Bot
parent 7e0146ece4
commit 7ce8ed55e1
2 changed files with 5 additions and 5 deletions

View File

@@ -226,7 +226,7 @@ def _dataclass_list_from_dict_list(dlist, typeannot):
keys = np.split(list(all_keys_res), indices[:-1])
vals = np.split(list(all_vals_res), indices[:-1])
return [cls(zip(*k, v)) for k, v in zip(keys, vals)]
return [cls(zip(k, v)) for k, v in zip(keys, vals)]
elif not dataclasses.is_dataclass(typeannot):
return dlist