diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-03-03 12:19:09 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-03-03 23:17:34 +0900 |
commit | 554199d30e418f72f215fae65924b47249d2544c (patch) | |
tree | fd952e21a8f4e9dabf91c5e3731dea3712ade006 /sphinx/quickstart.py | |
parent | 28b1aceefedbb9c3a12d6ba7c712df8ad5e98db8 (diff) | |
download | sphinx-git-554199d30e418f72f215fae65924b47249d2544c.tar.gz |
Upgrade to mypy-0.5
Diffstat (limited to 'sphinx/quickstart.py')
-rw-r--r-- | sphinx/quickstart.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py index c599f079a..0280e1e1f 100644 --- a/sphinx/quickstart.py +++ b/sphinx/quickstart.py @@ -44,7 +44,7 @@ from sphinx.util import texescape if False: # For type annotation - from typing import Any, Callable, Pattern # NOQA + from typing import Any, Callable, Dict, List, Pattern # NOQA TERM_ENCODING = getattr(sys.stdin, 'encoding', None) @@ -108,11 +108,11 @@ def nonempty(x): def choice(*l): - # type: (List[unicode]) -> Callable[[unicode], unicode] + # type: (unicode) -> Callable[[unicode], unicode] def val(x): # type: (unicode) -> unicode if x not in l: - raise ValidationError('Please enter one of %s.' % ', '.join(l)) # type: ignore + raise ValidationError('Please enter one of %s.' % ', '.join(l)) return x return val @@ -708,6 +708,7 @@ def main(argv=sys.argv): print('Invalid template variable: %s' % variable) generate(d, templatedir=opts.templatedir) + return 0 if __name__ == '__main__': |