MCPcopy Create free account
hub / github.com/bhowiebkr/PyFlowGraph / _parse_output_names_from_docstring

Method _parse_output_names_from_docstring

src/core/node.py:591–605  ·  view source on GitHub ↗

Parse output names from function docstring using @outputs annotation.

(self, func_def)

Source from the content-addressed store, hash-verified

589 return None, type_str.lower()
590
591 def _parse_output_names_from_docstring(self, func_def):
592 """Parse output names from function docstring using @outputs annotation."""
593 docstring = ast.get_docstring(func_def)
594 if not docstring:
595 return []
596
597 lines = docstring.split('\n')
598 for line in lines:
599 line = line.strip()
600 if line.startswith('@outputs:'):
601 # Format: @outputs: name1, name2, name3
602 outputs_str = line.replace('@outputs:', '').strip()
603 return [name.strip() for name in outputs_str.split(',') if name.strip()]
604
605 return []
606
607 def _update_data_pins(self, new_pins_dict, direction):
608 """Update data pins intelligently, preserving connections when renaming"""

Callers 1

update_pins_from_codeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected