File tree Expand file tree Collapse file tree 6 files changed +11
-9
lines changed Expand file tree Collapse file tree 6 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 47
47
48
48
# this package
49
49
from seed_intersphinx_mapping .cache import cache
50
- from seed_intersphinx_mapping .extension import setup
50
+ from seed_intersphinx_mapping .extension import setup # noqa: F401
51
51
52
52
__author__ : str = "Dominic Davis-Foster"
53
53
__copyright__ : str = "2020 Dominic Davis-Foster"
Original file line number Diff line number Diff line change 35
35
__all__ = ["clear_cache" ]
36
36
37
37
38
- def clear_cache ():
38
+ def clear_cache () -> int :
39
39
"""
40
40
Clear any cached URLs.
41
41
"""
Original file line number Diff line number Diff line change 4
4
5
5
# 3rd party
6
6
import pytest
7
+ from sphinx .application import Sphinx
7
8
from sphinx .testing .path import path
8
9
9
10
if sys .version_info >= (3 , 10 ):
15
16
16
17
17
18
@pytest .fixture (scope = "session" )
18
- def rootdir ():
19
+ def rootdir () -> path :
19
20
rdir = pathlib .Path (__file__ ).parent .absolute () / "doc-test"
20
21
if not (rdir / "test-root" ).is_dir ():
21
22
(rdir / "test-root" ).mkdir (parents = True )
22
23
return path (rdir )
23
24
24
25
25
26
@pytest .fixture ()
26
- def the_app (app ) :
27
+ def the_app (app : Sphinx ) -> Sphinx :
27
28
return app
Original file line number Diff line number Diff line change 1
1
# 3rd party
2
2
import pytest
3
3
from domdf_python_tools .paths import PathPlus
4
+ from sphinx .application import Sphinx
4
5
5
6
6
7
@pytest .fixture ()
@@ -17,7 +18,7 @@ def requirements(tmp_pathplus: PathPlus) -> None:
17
18
18
19
19
20
@pytest .mark .usefixtures ("requirements" )
20
- def test_integration (the_app ):
21
+ def test_integration (the_app : Sphinx ):
21
22
# app is a Sphinx application object for default sphinx project (`tests/doc-test/test-root`).
22
23
the_app .build ()
23
24
Original file line number Diff line number Diff line change 1
1
def test_importable ():
2
2
# this package
3
- import seed_intersphinx_mapping .__main__
3
+ import seed_intersphinx_mapping .__main__ # noqa: F401
4
4
5
5
6
6
# TODO: test the clear cache function
Original file line number Diff line number Diff line change @@ -16,13 +16,13 @@ def __init__(self):
16
16
self .directives = []
17
17
self .connections = []
18
18
19
- def add_config_value (self , * args , ** kwargs ):
19
+ def add_config_value (self , * args , ** kwargs ) -> None :
20
20
self .config_values .append (args )
21
21
22
- def add_directive (self , * args , ** kwargs ):
22
+ def add_directive (self , * args , ** kwargs ) -> None :
23
23
self .directives .append (args )
24
24
25
- def connect (self , * args , ** kwargs ):
25
+ def connect (self , * args , ** kwargs ) -> None :
26
26
self .connections .append (args )
27
27
28
28
You can’t perform that action at this time.
0 commit comments