(lines: list[str], line_index: int)
| 483 | |
| 484 | |
| 485 | def section_name_for_line(lines: list[str], line_index: int) -> str: |
| 486 | current_section = "" |
| 487 | for idx in range(0, line_index + 1): |
| 488 | stripped = lines[idx].strip() |
| 489 | match = re.match(r"^##\s+(.+)$", stripped) |
| 490 | if match: |
| 491 | current_section = match.group(1).strip() |
| 492 | return current_section |
| 493 | |
| 494 | |
| 495 | def subsection_name_for_line(lines: list[str], line_index: int) -> str: |
no outgoing calls
no test coverage detected