diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-07-04 01:36:40 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-07-06 14:38:52 +0900 |
commit | 3f6565df6323534e69d797003d8cb20e99c2c255 (patch) | |
tree | 51cab8f0d98114fe243ffe7ee63d8f3c7a77b9fe | |
parent | 05f75b7c9427c0354f63639178676da0d67f938f (diff) | |
download | sphinx-git-3f6565df6323534e69d797003d8cb20e99c2c255.tar.gz |
Migrate to py3 style type annotation: sphinx.testing.fixtures
-rw-r--r-- | sphinx/testing/fixtures.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sphinx/testing/fixtures.py b/sphinx/testing/fixtures.py index 93195fc40..443a7dd5c 100644 --- a/sphinx/testing/fixtures.py +++ b/sphinx/testing/fixtures.py @@ -14,25 +14,20 @@ import sys from collections import namedtuple from io import StringIO from subprocess import PIPE +from typing import Any, Dict import pytest from . import util -if False: - # For type annotation - from typing import Any, Dict, Union # NOQA - @pytest.fixture(scope='session') -def rootdir(): - # type: () -> None +def rootdir() -> None: return None @pytest.fixture def app_params(request, test_params, shared_result, sphinx_test_tempdir, rootdir): - # type: (Any, Any, Any, Any, Any) -> None """ parameters that is specified by 'pytest.mark.sphinx' for sphinx.application.Sphinx initialization @@ -158,10 +153,10 @@ def make_app(test_params, monkeypatch): status, warning = StringIO(), StringIO() kwargs.setdefault('status', status) kwargs.setdefault('warning', warning) - app_ = util.SphinxTestApp(*args, **kwargs) # type: Union[util.SphinxTestApp, util.SphinxTestAppWrapperForSkipBuilding] # NOQA + app_ = util.SphinxTestApp(*args, **kwargs) # type: Any apps.append(app_) if test_params['shared_result']: - app_ = util.SphinxTestAppWrapperForSkipBuilding(app_) # type: ignore + app_ = util.SphinxTestAppWrapperForSkipBuilding(app_) return app_ yield make |