|
70 | 70 | from docutils.nodes import Node |
71 | 71 |
|
72 | 72 | from sphinx.application import Sphinx |
73 | | - from sphinx.builders.html._ctx import _GlobalContextHTML, _PageContext |
| 73 | + from sphinx.builders.html._ctx import _GlobalContextHTML, _PageContextHTML |
74 | 74 | from sphinx.config import Config |
75 | 75 | from sphinx.environment import BuildEnvironment |
76 | 76 | from sphinx.util.typing import ExtensionMetadata |
@@ -1043,7 +1043,7 @@ def get_output_path(self, page_name: str, /) -> Path: |
1043 | 1043 | def get_outfilename(self, pagename: str) -> _StrPath: |
1044 | 1044 | return _StrPath(self.get_output_path(pagename)) |
1045 | 1045 |
|
1046 | | - def add_sidebars(self, pagename: str, ctx: _PageContext) -> None: |
| 1046 | + def add_sidebars(self, pagename: str, ctx: _PageContextHTML) -> None: |
1047 | 1047 | def has_wildcard(pattern: str) -> bool: |
1048 | 1048 | return any(char in pattern for char in '*?[') |
1049 | 1049 |
|
@@ -1083,7 +1083,7 @@ def handle_page( |
1083 | 1083 | outfilename: Path | None = None, |
1084 | 1084 | event_arg: Any = None, |
1085 | 1085 | ) -> None: |
1086 | | - ctx: _PageContext = self.globalcontext.copy() # type: ignore[assignment] |
| 1086 | + ctx: _PageContextHTML = self.globalcontext.copy() # type: ignore[assignment] |
1087 | 1087 | # current_page_name is backwards compatibility |
1088 | 1088 | ctx['pagename'] = ctx['current_page_name'] = pagename |
1089 | 1089 | ctx['encoding'] = self.config.html_output_encoding |
@@ -1264,7 +1264,7 @@ def js_tag(js: _JavaScript | str) -> str: |
1264 | 1264 | copyfile(self.env.doc2path(pagename), source_file_path, force=True) |
1265 | 1265 |
|
1266 | 1266 | def update_page_context( |
1267 | | - self, pagename: str, templatename: str, ctx: _PageContext, event_arg: Any |
| 1267 | + self, pagename: str, templatename: str, ctx: _PageContextHTML, event_arg: Any |
1268 | 1268 | ) -> None: |
1269 | 1269 | pass |
1270 | 1270 |
|
|
0 commit comments