Flush any remaining buffered message.
(self)
| 238 | return (formatted_line, None) |
| 239 | |
| 240 | def flush(self) -> Optional[str]: |
| 241 | """Flush any remaining buffered message.""" |
| 242 | with self._lock: |
| 243 | if self._last_formatted and self._count > 1: |
| 244 | # Create footnote line for repeated message |
| 245 | indent = " " * 31 |
| 246 | count_line = f"{indent}{Colors.TREE}\u2514\u2500 {Colors.BURST_COUNT}(Repeated {self._count} times){Colors.RESET}" |
| 247 | result = f"{self._last_formatted}\n{count_line}" |
| 248 | self._last_key = None |
| 249 | self._last_formatted = None |
| 250 | self._count = 0 |
| 251 | return result |
| 252 | # Don't return anything if count <= 1 (no repetition to report) |
| 253 | self._last_key = None |
| 254 | self._last_formatted = None |
| 255 | self._count = 0 |
| 256 | return None |
| 257 | |
| 258 | |
| 259 | # Global burst buffer instance |
no outgoing calls