Skip to content

Commit ddb4d90

Browse files
committed
fixed up name of generic types in type_repr_
1 parent b231341 commit ddb4d90

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nipype2pydra/workflow.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ def type_repr_(t):
122122
+ "]"
123123
)
124124
if t in (ty.Any, ty.Union, ty.List, ty.Tuple):
125-
return f"ty.{t.__name__}"
125+
try:
126+
t_name = t.__name__
127+
except AttributeError:
128+
t_name = t._name
129+
return f"ty.{t_name}"
126130
elif issubclass(t, Field):
127131
return t.primitive.__name__
128132
elif issubclass(t, FileSet):

0 commit comments

Comments
 (0)