(sec: Section)
| 315 | |
| 316 | |
| 317 | def section_to_dict(sec: Section) -> dict: |
| 318 | return { |
| 319 | "level": sec.level, |
| 320 | "seq": sec.seq, |
| 321 | "anchor": sec.anchor, |
| 322 | "title": sec.title, |
| 323 | "line": sec.line, |
| 324 | "char_start": sec.char_start, |
| 325 | "char_end": sec.char_end, |
| 326 | "preview": sec.preview, |
| 327 | "agent_summary": sec.agent_summary, |
| 328 | "children": [section_to_dict(c) for c in sec.children], |
| 329 | } |
| 330 | |
| 331 | |
| 332 | def flatten_sections(sections: list[Section]) -> list[Section]: |
no outgoing calls
no test coverage detected