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 4747
4848# this package
4949from seed_intersphinx_mapping .cache import cache
50- from seed_intersphinx_mapping .extension import setup
50+ from seed_intersphinx_mapping .extension import setup # noqa: F401
5151
5252__author__ : str = "Dominic Davis-Foster"
5353__copyright__ : str = "2020 Dominic Davis-Foster"
Original file line number Diff line number Diff line change 3535__all__ = ["clear_cache" ]
3636
3737
38- def clear_cache ():
38+ def clear_cache () -> int :
3939 """
4040 Clear any cached URLs.
4141 """
Original file line number Diff line number Diff line change 44
55# 3rd party
66import pytest
7+ from sphinx .application import Sphinx
78from sphinx .testing .path import path
89
910if sys .version_info >= (3 , 10 ):
1516
1617
1718@pytest .fixture (scope = "session" )
18- def rootdir ():
19+ def rootdir () -> path :
1920 rdir = pathlib .Path (__file__ ).parent .absolute () / "doc-test"
2021 if not (rdir / "test-root" ).is_dir ():
2122 (rdir / "test-root" ).mkdir (parents = True )
2223 return path (rdir )
2324
2425
2526@pytest .fixture ()
26- def the_app (app ) :
27+ def the_app (app : Sphinx ) -> Sphinx :
2728 return app
Original file line number Diff line number Diff line change 11# 3rd party
22import pytest
33from domdf_python_tools .paths import PathPlus
4+ from sphinx .application import Sphinx
45
56
67@pytest .fixture ()
@@ -17,7 +18,7 @@ def requirements(tmp_pathplus: PathPlus) -> None:
1718
1819
1920@pytest .mark .usefixtures ("requirements" )
20- def test_integration (the_app ):
21+ def test_integration (the_app : Sphinx ):
2122 # app is a Sphinx application object for default sphinx project (`tests/doc-test/test-root`).
2223 the_app .build ()
2324
Original file line number Diff line number Diff line change 11def test_importable ():
22 # this package
3- import seed_intersphinx_mapping .__main__
3+ import seed_intersphinx_mapping .__main__ # noqa: F401
44
55
66# TODO: test the clear cache function
Original file line number Diff line number Diff line change @@ -16,13 +16,13 @@ def __init__(self):
1616 self .directives = []
1717 self .connections = []
1818
19- def add_config_value (self , * args , ** kwargs ):
19+ def add_config_value (self , * args , ** kwargs ) -> None :
2020 self .config_values .append (args )
2121
22- def add_directive (self , * args , ** kwargs ):
22+ def add_directive (self , * args , ** kwargs ) -> None :
2323 self .directives .append (args )
2424
25- def connect (self , * args , ** kwargs ):
25+ def connect (self , * args , ** kwargs ) -> None :
2626 self .connections .append (args )
2727
2828
You can’t perform that action at this time.
0 commit comments