(app: Sphinx, _exc: Exception)
| 43 | |
| 44 | |
| 45 | def write_glossary_json(app: Sphinx, _exc: Exception) -> None: |
| 46 | if not getattr(app.env, 'glossary_terms', None): |
| 47 | return |
| 48 | |
| 49 | logger.info('Writing glossary.json', color='green') |
| 50 | dest = Path(app.outdir, '_static', 'glossary.json') |
| 51 | dest.parent.mkdir(exist_ok=True) |
| 52 | dest.write_text(json.dumps(app.env.glossary_terms), encoding='utf-8') |
| 53 | |
| 54 | |
| 55 | def setup(app: Sphinx) -> ExtensionMetadata: |
nothing calls this directly
no test coverage detected
searching dependent graphs…