Skip to content

Commit 97c6f11

Browse files
committed
removed implicit extraction of output names from return values
1 parent fb86964 commit 97c6f11

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

pydra/design/base.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -783,19 +783,6 @@ def extract_function_inputs_and_outputs(
783783
else:
784784
inputs[inpt_name] = arg_type(type=inpt, default=default)
785785
return_type = type_hints.get("return", ty.Any)
786-
if outputs is None:
787-
src = inspect.getsource(function).strip()
788-
return_lines = re.findall(r"\n\s+return .*$", src)
789-
if len(return_lines) == 1 and src.endswith(return_lines[0]):
790-
return_line = return_lines[0].split("#")[0]
791-
implicit_outputs = [
792-
o.strip()
793-
for o in re.match(r"\s*return\s+(.*)", return_line).group(1).split(",")
794-
]
795-
if len(implicit_outputs) and all(
796-
re.match(r"^\w+$", o) for o in implicit_outputs
797-
):
798-
outputs = implicit_outputs
799786
if outputs and len(outputs) > 1:
800787
if return_type is not ty.Any:
801788
if ty.get_origin(return_type) is not tuple:

0 commit comments

Comments
 (0)