11# flake8: noqa: E501
22"""Sphinx configuration for g."""
33
4+ from __future__ import annotations
5+
46import contextlib
57import inspect
68import pathlib
7173html_extra_path = ["manifest.json" ]
7274html_theme = "furo"
7375html_theme_path : list [str ] = []
74- html_theme_options : dict [str , t . Union [ str , list [dict [str , str ] ]]] = {
76+ html_theme_options : dict [str , str | list [dict [str , str ]]] = {
7577 "light_logo" : "img/g.svg" ,
7678 "dark_logo" : "img/g-dark.svg" ,
7779 "footer_icons" : [
129131}
130132
131133
132- def linkcode_resolve (domain : str , info : dict [str , str ]) -> t . Union [ None , str ] :
134+ def linkcode_resolve (domain : str , info : dict [str , str ]) -> None | str :
133135 """
134136 Determine the URL corresponding to Python object.
135137
@@ -199,7 +201,7 @@ def linkcode_resolve(domain: str, info: dict[str, str]) -> t.Union[None, str]:
199201 )
200202
201203
202- def remove_tabs_js (app : " Sphinx" , exc : Exception ) -> None :
204+ def remove_tabs_js (app : Sphinx , exc : Exception ) -> None :
203205 """Remove tabs.js from _static after build."""
204206 # Fix for sphinx-inline-tabs#18
205207 if app .builder .format == "html" and not exc :
@@ -208,6 +210,6 @@ def remove_tabs_js(app: "Sphinx", exc: Exception) -> None:
208210 tabs_js .unlink () # When python 3.7 deprecated, use missing_ok=True
209211
210212
211- def setup (app : " Sphinx" ) -> None :
213+ def setup (app : Sphinx ) -> None :
212214 """Configure Sphinx app hooks."""
213215 app .connect ("build-finished" , remove_tabs_js )
0 commit comments