From f8ddc44c503b8285ec79cc2450caaa67bf487928 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Mon, 10 Jun 2019 02:47:00 +0900 Subject: [PATCH] Migrate to py3 style type annotation: sphinx.builders.qthelp --- sphinx/builders/qthelp.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sphinx/builders/qthelp.py b/sphinx/builders/qthelp.py index d87246148..4053f437f 100644 --- a/sphinx/builders/qthelp.py +++ b/sphinx/builders/qthelp.py @@ -9,17 +9,14 @@ """ import warnings +from typing import Any, Dict from sphinxcontrib.qthelp import QtHelpBuilder, render_file import sphinx +from sphinx.application import Sphinx from sphinx.deprecation import RemovedInSphinx40Warning, deprecated_alias -if False: - # For type annotation - from typing import Any, Dict # NOQA - from sphinx.application import Sphinx # NOQA - deprecated_alias('sphinx.builders.qthelp', { @@ -29,8 +26,7 @@ deprecated_alias('sphinx.builders.qthelp', RemovedInSphinx40Warning) -def setup(app): - # type: (Sphinx) -> Dict[str, Any] +def setup(app: Sphinx) -> Dict[str, Any]: warnings.warn('sphinx.builders.qthelp has been moved to sphinxcontrib-qthelp.', RemovedInSphinx40Warning)