1212from sphinx ._cli .util .errors import strip_escape_sequences
1313from sphinx .jinja2glue import BuiltinTemplateLoader
1414from sphinx .util .fileutil import _template_basename , copy_asset , copy_asset_file
15+ from sphinx .util .template import BaseRenderer
1516
1617if TYPE_CHECKING :
1718 from sphinx .testing .util import SphinxTestApp
1819
1920
20- class DummyTemplateLoader (BuiltinTemplateLoader ):
21+ class DummyTemplateLoader (BuiltinTemplateLoader , BaseRenderer ):
2122 def __init__ (self ) -> None :
2223 super ().__init__ ()
2324 builder = mock .Mock ()
@@ -26,7 +27,7 @@ def __init__(self) -> None:
2627 self .init (builder )
2728
2829
29- def test_copy_asset_file (tmp_path ) :
30+ def test_copy_asset_file (tmp_path : Path ) -> None :
3031 renderer = DummyTemplateLoader ()
3132
3233 # copy normal file
@@ -69,7 +70,7 @@ def test_copy_asset_file(tmp_path):
6970 assert (subdir2 / 'asset.txt.jinja' ).read_text (encoding = 'utf8' ) == '# {{var1}} data'
7071
7172
72- def test_copy_asset (tmp_path ) :
73+ def test_copy_asset (tmp_path : Path ) -> None :
7374 renderer = DummyTemplateLoader ()
7475
7576 # prepare source files
@@ -113,7 +114,7 @@ def test_copy_asset(tmp_path):
113114 assert sidebar == 'sidebar: baz'
114115
115116 # copy with exclusion
116- def excluded (path ) :
117+ def excluded (path : str ) -> bool :
117118 return 'sidebar.html' in path or 'basic.css' in path
118119
119120 destdir = tmp_path / 'test3'
0 commit comments