(text: str)
| 29 | |
| 30 | |
| 31 | def code_extract(text: str) -> str: |
| 32 | lines = text.split('\n') |
| 33 | longest_line_pair = (0, 0) |
| 34 | longest_so_far = 0 |
| 35 | |
| 36 | for i in range(len(lines)): |
| 37 | for j in range(i + 1, len(lines)): |
| 38 | current_lines = '\n'.join(lines[i:j + 1]) |
| 39 | if syntax_check(current_lines): |
| 40 | current_length = sum(1 for line in lines[i:j + 1] |
| 41 | if line.strip()) |
| 42 | if current_length > longest_so_far: |
| 43 | longest_so_far = current_length |
| 44 | longest_line_pair = (i, j) |
| 45 | |
| 46 | return '\n'.join(lines[longest_line_pair[0]:longest_line_pair[1] + 1]) |
| 47 | |
| 48 | |
| 49 | def get_deps(nodes: List[Tuple[str, Node]]) -> Dict[str, Set[str]]: |
no test coverage detected