diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-06-21 23:23:30 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-06-21 23:23:30 +0900 |
commit | 3d180f9385e585d414296a64bdda1d8f8080e12d (patch) | |
tree | 25a42fd66ace6b04a97b5e799dd286cfa648bd0d /sphinx/apidoc.py | |
parent | f14d60dcd2772b7e973cc7dee7a6e625b44926c6 (diff) | |
parent | e78133a83ecef14deb058617983761a99d6304bb (diff) | |
download | sphinx-git-3d180f9385e585d414296a64bdda1d8f8080e12d.tar.gz |
Merge branch '1.7'
Diffstat (limited to 'sphinx/apidoc.py')
-rw-r--r-- | sphinx/apidoc.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sphinx/apidoc.py b/sphinx/apidoc.py index dffa4a9ef..95a1d14f7 100644 --- a/sphinx/apidoc.py +++ b/sphinx/apidoc.py @@ -9,6 +9,7 @@ :license: BSD, see LICENSE for details. """ +import sys import warnings from sphinx.deprecation import RemovedInSphinx20Warning @@ -16,19 +17,18 @@ from sphinx.ext.apidoc import main as _main if False: # For type annotation - from typing import Any # NOQA + from typing import List # NOQA from sphinx.application import Sphinx # NOQA -def main(*args, **kwargs): - # type: (Any, Any) -> None +def main(argv=sys.argv): + # type: (List[str]) -> None warnings.warn( '`sphinx.apidoc.main()` has moved to `sphinx.ext.apidoc.main()`.', RemovedInSphinx20Warning, stacklevel=2, ) - args = args[1:] # skip first argument to adjust arguments (refs: #4615) - _main(*args, **kwargs) + _main(argv[1:]) # skip first argument to adjust arguments (refs: #4615) # So program can be started with "python -m sphinx.apidoc ..." |