diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-06-20 22:14:01 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-20 22:14:01 +0900 |
commit | e78133a83ecef14deb058617983761a99d6304bb (patch) | |
tree | 273e65c0f1a4038df9fa4aae1f35ffc4418fadf3 /sphinx/apidoc.py | |
parent | 6e27f6c336fa81d1fa9572be539eb3691612e396 (diff) | |
parent | f54d886a619905e49bffdc17e46ca2f2d83b9981 (diff) | |
download | sphinx-git-e78133a83ecef14deb058617983761a99d6304bb.tar.gz |
Merge pull request #5106 from tk0miya/5104_broken_apidoc_main
Fix #5104: apidoc: Interface of ``sphinx.apidoc:main()`` has changed
Diffstat (limited to 'sphinx/apidoc.py')
-rw-r--r-- | sphinx/apidoc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/apidoc.py b/sphinx/apidoc.py index be5e5c5ab..16089370b 100644 --- a/sphinx/apidoc.py +++ b/sphinx/apidoc.py @@ -9,20 +9,20 @@ :license: BSD, see LICENSE for details. """ +import sys import warnings from sphinx.deprecation import RemovedInSphinx20Warning from sphinx.ext.apidoc import main as _main -def main(*args, **kwargs): +def main(argv=sys.argv): 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 ..." |