@@ -106,6 +106,8 @@ def connect(self, inpt):
106106 inpt = inpt .value
107107
108108 input_type_name = type (inpt ).__name__
109+ if input_type_name == "list" :
110+ input_type_name = f"list[{ type (inpt [0 ]).__name__ } ]"
109111 if not (input_type_name in self ._python_expected_types or ["Outputs" , "Output" , "Any" ]):
110112 for types in self ._python_expected_types :
111113 print (types , end = " " )
@@ -114,7 +116,7 @@ def connect(self, inpt):
114116
115117 corresponding_pins = []
116118 self ._operator ()._find_outputs_corresponding_pins (
117- self ._python_expected_types , inpt , self ._pin , corresponding_pins
119+ self ._python_expected_types , inpt , self ._pin , corresponding_pins , input_type_name
118120 )
119121 if len (corresponding_pins ) > 1 :
120122 err_str = "Pin connection is ambiguous, specify the input to connect to with:\n "
@@ -132,7 +134,7 @@ def connect(self, inpt):
132134
133135 if len (corresponding_pins ) == 0 :
134136 err_str = (
135- f"The input operator for the { self ._spec .name } pin must be "
137+ f"The input for the { self ._spec .name } pin is of type { input_type_name } but must be "
136138 "one of the following types:\n "
137139 )
138140 err_str += "\n " .join ([f"- { py_type } " for py_type in self ._python_expected_types ])
@@ -260,12 +262,15 @@ def connect(self, inpt):
260262 inpt = inpt .value
261263
262264 input_type_name = type (inpt ).__name__
265+ if input_type_name == "list" :
266+ input_type_name = f"list[{ type (inpt [0 ]).__name__ } ]"
263267 for input_pin in self ._inputs :
264268 self ._operator ()._find_outputs_corresponding_pins (
265269 input_pin ._python_expected_types ,
266270 inpt ,
267271 input_pin ._pin ,
268272 corresponding_pins ,
273+ input_type_name ,
269274 )
270275 if len (corresponding_pins ) > 1 :
271276 err_str = "Pin connection is ambiguous, specify the input to connect to with:\n "
0 commit comments