|
14 | 14 | from sphinx.testing.util import SphinxTestApp, SphinxTestAppWrapperForSkipBuilding |
15 | 15 |
|
16 | 16 | if TYPE_CHECKING: |
17 | | - from collections.abc import Callable, Generator |
| 17 | + from collections.abc import Callable, Iterator |
18 | 18 | from pathlib import Path |
19 | 19 | from typing import Any |
20 | 20 |
|
@@ -147,7 +147,7 @@ def app( |
147 | 147 | app_params: tuple[dict, dict], |
148 | 148 | make_app: Callable, |
149 | 149 | shared_result: SharedResult, |
150 | | -) -> Generator[SphinxTestApp, None, None]: |
| 150 | +) -> Iterator[SphinxTestApp]: |
151 | 151 | """ |
152 | 152 | Provides the 'sphinx.application.Sphinx' object |
153 | 153 | """ |
@@ -183,7 +183,7 @@ def warning(app: SphinxTestApp) -> StringIO: |
183 | 183 |
|
184 | 184 |
|
185 | 185 | @pytest.fixture() |
186 | | -def make_app(test_params: dict, monkeypatch: Any) -> Generator[Callable, None, None]: |
| 186 | +def make_app(test_params: dict, monkeypatch: Any) -> Iterator[Callable]: |
187 | 187 | """ |
188 | 188 | Provides make_app function to initialize SphinxTestApp instance. |
189 | 189 | if you want to initialize 'app' in your test function. please use this |
@@ -289,7 +289,7 @@ def sphinx_test_tempdir(tmp_path_factory: Any) -> Path: |
289 | 289 |
|
290 | 290 |
|
291 | 291 | @pytest.fixture() |
292 | | -def rollback_sysmodules() -> Generator[None, None, None]: # NoQA: PT004 |
| 292 | +def rollback_sysmodules() -> Iterator[None]: # NoQA: PT004 |
293 | 293 | """ |
294 | 294 | Rollback sys.modules to its value before testing to unload modules |
295 | 295 | during tests. |
|
0 commit comments