File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 1- __version__ = (0 , 0 , 9 )
1+ __version__ = (0 , 0 , 10 )
Original file line number Diff line number Diff line change @@ -91,12 +91,12 @@ def reduce_init(clazz, **d):
9191 reduce_arg = getattr(sub, "__args__", [None])[0]
9292 if k in REFERENCED_ARGS: # Directly refcounted
9393 reduce_arg = sub = lambda x: x
94- if isinstance(d[k], list):
94+ if reduce_arg is not None and isinstance(d[k], list):
9595 if hasattr(reduce_arg, "__annotations__"):
9696 setattr(self, k, [reduce_arg(**x) for x in d[k]])
9797 else:
9898 setattr(self, k, [reduce_arg(x) for x in d[k]])
99- elif isinstance(d[k], dict) and hasattr(sub, "__annotations__"):
99+ elif reduce_arg is not None and isinstance(d[k], dict) and hasattr(sub, "__annotations__"):
100100 setattr(self, k, sub(**d[k]))
101101 else:
102102 if isinstance(d[k], dict):
You can’t perform that action at this time.
0 commit comments