16
16
from sphinx .testing .util import _clean_up_global_state
17
17
18
18
if TYPE_CHECKING :
19
- from collections .abc import Iterator
19
+ from collections .abc import Callable , Iterator
20
+ from typing import Any
21
+
22
+ from sphinx .testing .util import SphinxTestApp
20
23
21
24
_TESTS_ROOT = Path (__file__ ).resolve ().parent
22
25
if 'CI' in os .environ and (_TESTS_ROOT / 'roots-read-only' ).is_dir ():
@@ -83,7 +86,7 @@ def _http_teapot(monkeypatch: pytest.MonkeyPatch) -> Iterator[None]:
83
86
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/418
84
87
response = SimpleNamespace (status_code = 418 )
85
88
86
- def _request (* args , ** kwargs ) :
89
+ def _request (* args : Any , ** kwargs : Any ) -> SimpleNamespace :
87
90
return response
88
91
89
92
with monkeypatch .context () as m :
@@ -92,10 +95,13 @@ def _request(*args, **kwargs):
92
95
93
96
94
97
@pytest .fixture
95
- def make_app_with_empty_project (make_app , tmp_path ):
98
+ def make_app_with_empty_project (
99
+ make_app : Callable [..., SphinxTestApp ],
100
+ tmp_path : Path ,
101
+ ) -> Callable [..., SphinxTestApp ]:
96
102
(tmp_path / 'conf.py' ).touch ()
97
103
98
- def _make_app (* args , ** kw ) :
104
+ def _make_app (* args : Any , ** kw : Any ) -> SphinxTestApp :
99
105
kw .setdefault ('srcdir' , Path (tmp_path ))
100
106
return make_app (* args , ** kw )
101
107
0 commit comments