@@ -61,10 +61,10 @@ def copy_asset_files(app, exception):
61
61
if exception is None : # build succeeded
62
62
63
63
context = {}
64
- for attr in app .config .values :
64
+ for attr , opt in app .config .values . items () :
65
65
if attr .startswith ('hoverxref_' ):
66
66
# First, add the default values to the context
67
- context [attr ] = app . config . values [ attr ][ 0 ]
67
+ context [attr ] = getattr ( opt , "default" , opt [ 0 ])
68
68
69
69
for attr in dir (app .config ):
70
70
if attr .startswith ('hoverxref_' ):
@@ -277,7 +277,8 @@ def setup_theme(app, exception):
277
277
"""
278
278
css_file = None
279
279
theme = app .config .html_theme
280
- default , rebuild , types = app .config .values .get ('hoverxref_modal_class' )
280
+ opt = app .config .values ['hoverxref_modal_class' ]
281
+ default = getattr (opt , "default" , opt [0 ])
281
282
if theme == 'sphinx_material' :
282
283
if app .config .hoverxref_modal_class == default :
283
284
app .config .hoverxref_modal_class = 'md-typeset'
@@ -309,8 +310,8 @@ def setup_assets_policy(app, exception):
309
310
310
311
def deprecated_configs_warning (app , exception ):
311
312
"""Log warning message if old configs are used."""
312
- default , rebuild , types = app .config .values . get ( 'hoverxref_tooltip_api_host' )
313
- if app .config .hoverxref_tooltip_api_host != default :
313
+ opt = app .config .values [ 'hoverxref_tooltip_api_host' ]
314
+ if app .config .hoverxref_tooltip_api_host != getattr ( opt , " default" , opt [ 0 ]) :
314
315
message = '"hoverxref_tooltip_api_host" is deprecated and replaced by "hoverxref_api_host".'
315
316
logger .warning (message )
316
317
app .config .hoverxref_api_host = app .config .hoverxref_tooltip_api_host
0 commit comments