From c9bc4d96988162d16f2a6356d4a4619aa490b999 Mon Sep 17 00:00:00 2001 From: Paul Kienzle Date: Thu, 4 Jun 2015 15:01:27 -0400 Subject: [PATCH 1/2] allow apidoc using 'python -m sphinx.apidoc' --- sphinx/apidoc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sphinx/apidoc.py b/sphinx/apidoc.py index 10311e6f3f..805e862c9c 100644 --- a/sphinx/apidoc.py +++ b/sphinx/apidoc.py @@ -373,3 +373,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) + +# So program can be started with "python -m sphinx.apidoc ..." +if __name__ == "__main__": + main() From 04ceb025b403913ad5dda4c4753cdf7578418739 Mon Sep 17 00:00:00 2001 From: Paul Kienzle Date: Thu, 4 Jun 2015 15:25:58 -0400 Subject: [PATCH 2/2] fix pep8 noise --- sphinx/domains/cpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index 281990c9cc..ae383f348e 100644 --- a/sphinx/domains/cpp.py +++ b/sphinx/domains/cpp.py @@ -2424,7 +2424,7 @@ class CPPObject(ObjectDescription): if len(ast.prefixedName.names) == 1: # TODO: we could warn, but it is somewhat equivalent to unscoped # enums, without the enum - return # no parent + return # no parent parentPrefixedAstName = ASTNestedName(ast.prefixedName.names[:-1]) parentPrefixedName = text_type(parentPrefixedAstName).lstrip(':') if parentPrefixedName not in objects: