@@ -52,13 +52,13 @@ def sphinx_setup(app: Sphinx):
52
52
for name , default , field in NbParserConfig ().as_triple ():
53
53
if not field .metadata .get ("sphinx_exclude" ):
54
54
# TODO add types?
55
- app .add_config_value (f"nb_{ name } " , default , "env" , [ object ] )
55
+ app .add_config_value (f"nb_{ name } " , default , "env" , Any )
56
56
if "legacy_name" in field .metadata :
57
57
app .add_config_value (
58
- f"{ field .metadata ['legacy_name' ]} " , _UNSET , "env" , [ object ]
58
+ f"{ field .metadata ['legacy_name' ]} " , _UNSET , "env" , Any
59
59
)
60
60
# Handle non-standard deprecation
61
- app .add_config_value ("nb_render_priority" , _UNSET , "env" , [ object ] )
61
+ app .add_config_value ("nb_render_priority" , _UNSET , "env" , Any )
62
62
63
63
# generate notebook configuration from Sphinx configuration
64
64
# this also validates the configuration values
@@ -130,7 +130,7 @@ def create_mystnb_config(app):
130
130
"""Generate notebook configuration from Sphinx configuration"""
131
131
132
132
# Ignore type checkers because the attribute is dynamically assigned
133
- from sphinx .util .console import bold
133
+ from sphinx .util .console import bold # type: ignore[attr-defined]
134
134
135
135
values = {}
136
136
for name , _ , field in NbParserConfig ().as_triple ():
@@ -227,4 +227,4 @@ def add_per_page_html_resources(
227
227
return
228
228
js_files = NbMetadataCollector .get_js_files (cast (SphinxEnvType , app .env ), pagename )
229
229
for path , kwargs in js_files .values ():
230
- app .add_js_file (path , ** kwargs )
230
+ app .add_js_file (path , ** kwargs ) # type: ignore
0 commit comments