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/apidoc.py | |
parent | 28b1aceefedbb9c3a12d6ba7c712df8ad5e98db8 (diff) | |
download | sphinx-git-554199d30e418f72f215fae65924b47249d2544c.tar.gz |
Upgrade to mypy-0.5
Diffstat (limited to 'sphinx/apidoc.py')
-rw-r--r-- | sphinx/apidoc.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/apidoc.py b/sphinx/apidoc.py index 11d2994ef..4533e5103 100644 --- a/sphinx/apidoc.py +++ b/sphinx/apidoc.py @@ -29,7 +29,7 @@ from sphinx.quickstart import EXTENSIONS if False: # For type annotation - from typing import Any, Tuple # NOQA + from typing import Any, List, Tuple # NOQA # automodule options if 'SPHINX_APIDOC_OPTIONS' in os.environ: @@ -274,7 +274,7 @@ def is_excluded(root, excludes): e.g. an exlude "foo" also accidentally excluding "foobar". """ for exclude in excludes: - if fnmatch(root, exclude): # type: ignore + if fnmatch(root, exclude): return True return False @@ -427,6 +427,7 @@ Note: By default this script will not overwrite already created files.""") qs.generate(d, silent=True, overwrite=opts.force) elif not opts.notoc: create_modules_toc_file(modules, opts) + return 0 # So program can be started with "python -m sphinx.apidoc ..." |