(arg_string)
| 14 | return name.split(".")[-1] |
| 15 | |
| 16 | def 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 | |
| 37 | def is_method_signature(expr: str) -> bool: |
| 38 | m = re.match(r"\S+\(.*\)", expr) |
no test coverage detected