gemini-code-assist[bot] commented on code in PR #194:
URL: https://github.com/apache/tvm-ffi/pull/194#discussion_r2464491814
##########
docs/conf.py:
##########
@@ -308,6 +309,14 @@ def _import_cls(cls_name: str) -> type | None:
return None
+def _force_local_images(app: sphinx.application.Sphinx) -> None:
+ # For HTML-family builders, tell Sphinx "do NOT support remote images".
+ # This triggers the built-in ImageDownloader post-transform to fetch &
rewrite.
+ if getattr(app, "builder", None) and app.builder.name in {"html",
"dirhtml", "singlehtml"}:
Review Comment:

For better maintainability and to more accurately target all HTML-based
builders, it's better to check the builder's `format` attribute instead of its
`name` against a hardcoded set. All standard HTML builders in Sphinx have their
`format` attribute set to `'html'`. This change will make the code more robust
if other HTML-based builders are used in the future.
```suggestion
if getattr(app, "builder", None) and app.builder.format == "html":
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]