(self)
| 157 | self.topics[topic_label] = body + "\n" |
| 158 | |
| 159 | def finish(self) -> None: |
| 160 | topics_repr = "\n".join( |
| 161 | f" '{topic}': {_repr(self.topics[topic])}," |
| 162 | for topic in sorted(self.topics) |
| 163 | ) |
| 164 | topics = f"""\ |
| 165 | # Autogenerated by Sphinx on {asctime()} |
| 166 | # as part of the release process. |
| 167 | |
| 168 | topics = {{ |
| 169 | {topics_repr} |
| 170 | }} |
| 171 | """ |
| 172 | self.outdir.joinpath("topics.py").write_text(topics, encoding="utf-8") |
| 173 | |
| 174 | module_docs_repr = "\n".join( |
| 175 | f" '{module}': '{doc_file}'," |
| 176 | for module, doc_file in sorted(self.module_docs.items()) |
| 177 | ) |
| 178 | module_docs = f"""\ |
| 179 | # Autogenerated by Sphinx on {asctime()} |
| 180 | # as part of the release process. |
| 181 | |
| 182 | module_docs = {{ |
| 183 | {module_docs_repr} |
| 184 | }} |
| 185 | """ |
| 186 | self.outdir.joinpath("module_docs.py").write_text( |
| 187 | module_docs, encoding="utf-8" |
| 188 | ) |
| 189 | |
| 190 | |
| 191 | def _display_labels(item: tuple[str, Sequence[tuple[str, str]]]) -> str: |
nothing calls this directly
no test coverage detected