Represents the table of contents for a given page.
| 58 | |
| 59 | |
| 60 | class TableOfContents(Iterable[AnchorLink]): |
| 61 | """Represents the table of contents for a given page.""" |
| 62 | |
| 63 | def __init__(self, items: list[AnchorLink]) -> None: |
| 64 | self.items = items |
| 65 | |
| 66 | def __iter__(self) -> Iterator[AnchorLink]: |
| 67 | return iter(self.items) |
| 68 | |
| 69 | def __len__(self) -> int: |
| 70 | return len(self.items) |
| 71 | |
| 72 | def __str__(self) -> str: |
| 73 | return ''.join(str(item) for item in self) |
| 74 | |
| 75 | |
| 76 | def _parse_toc_token(token: _TocToken) -> AnchorLink: |
no outgoing calls
no test coverage detected
searching dependent graphs…