Skip to content

Commit 8a62df5

Browse files
committed
Version 0.0.10
Correctly handle built-in types
1 parent 69f7441 commit 8a62df5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

UnityPyTypetreeCodegen/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = (0, 0, 9)
1+
__version__ = (0, 0, 10)

UnityPyTypetreeCodegen/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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):

0 commit comments

Comments
 (0)