MCPcopy Create free account
hub / github.com/FSoft-AI4Code/HyperAgent / parse_arguments

Function parse_arguments

src/hyperagent/tasks/utils/bl/name_utils.py:16–35  ·  view source on GitHub ↗
(arg_string)

Source from the content-addressed store, hash-verified

14 return name.split(".")[-1]
15
16def parse_arguments(arg_string):
17 arguments = []
18 current_argument = ""
19 angle_bracket_count = 0
20
21 for char in arg_string:
22 if char == ',' and angle_bracket_count == 0:
23 arguments.append(current_argument.strip())
24 current_argument = ""
25 else:
26 current_argument += char
27 if char == '<':
28 angle_bracket_count += 1
29 elif char == '>':
30 angle_bracket_count -= 1
31
32 if current_argument:
33 arguments.append(current_argument.strip())
34
35 return arguments
36
37def is_method_signature(expr: str) -> bool:
38 m = re.match(r"\S+\(.*\)", expr)

Callers 1

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected