diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-06-18 21:48:03 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-06-18 21:48:03 +0900 |
commit | a61986256a364ba21d9f9afe1dffb7ffbef41218 (patch) | |
tree | acfc13b36ca608cf862b0b53f94c56fe738d7458 /sphinx/apidoc.py | |
parent | 62b6d209dc181978f202172e7338dabfdf21e1f4 (diff) | |
download | sphinx-git-a61986256a364ba21d9f9afe1dffb7ffbef41218.tar.gz |
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 ..." |