diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-06-05 12:46:12 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-06-10 23:06:08 +0900 |
commit | 1ab5e279f8a60865e31194d91bb021eeca02c31c (patch) | |
tree | a43a60ca2e8346190e8c8d4b9570132b42656973 /sphinx/builders/applehelp.py | |
parent | ccdad403c8f7df3669516c140f3fbbd8dd09dda5 (diff) | |
download | sphinx-git-1ab5e279f8a60865e31194d91bb021eeca02c31c.tar.gz |
Migrate to py3 style type annotation: sphinx.builders.applehelp
Diffstat (limited to 'sphinx/builders/applehelp.py')
-rw-r--r-- | sphinx/builders/applehelp.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sphinx/builders/applehelp.py b/sphinx/builders/applehelp.py index 0ee50ff56..d7dd336ca 100644 --- a/sphinx/builders/applehelp.py +++ b/sphinx/builders/applehelp.py @@ -9,6 +9,7 @@ """ import warnings +from typing import Any, Dict from sphinxcontrib.applehelp import ( AppleHelpCodeSigningFailed, @@ -16,13 +17,9 @@ from sphinxcontrib.applehelp import ( AppleHelpBuilder, ) +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.applehelp', { @@ -33,8 +30,7 @@ deprecated_alias('sphinx.builders.applehelp', RemovedInSphinx40Warning) -def setup(app): - # type: (Sphinx) -> Dict[str, Any] +def setup(app: Sphinx) -> Dict[str, Any]: warnings.warn('sphinx.builders.applehelp has been moved to sphinxcontrib-applehelp.', RemovedInSphinx40Warning) app.setup_extension('sphinxcontrib.applehelp') |