| 90 | |
| 91 | |
| 92 | class _HTMLTextParser(HTMLParser): |
| 93 | def __init__(self) -> None: |
| 94 | super().__init__() |
| 95 | self._parts: list[str] = [] |
| 96 | |
| 97 | def handle_data(self, data: str) -> None: |
| 98 | text = data.strip() |
| 99 | if text: |
| 100 | self._parts.append(text) |
| 101 | |
| 102 | def get_text(self) -> str: |
| 103 | return "\n".join(self._parts) |
| 104 | |
| 105 | |
| 106 | class InteractiveShell: |
no outgoing calls
no test coverage detected