From a36230688db59afa11612f46809c4041e10701d5 Mon Sep 17 00:00:00 2001 From: Sylvain Th?nault Date: Tue, 13 Apr 2010 12:30:34 +0200 Subject: [sphinx ext] implements resolve_name so autodocstring is also usable for module level objects --- sphinx_ext.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sphinx_ext.py') diff --git a/sphinx_ext.py b/sphinx_ext.py index 9bb82e6..ff06e70 100644 --- a/sphinx_ext.py +++ b/sphinx_ext.py @@ -11,6 +11,12 @@ class DocstringOnlyModuleDocumenter(autodoc.ModuleDocumenter): def document_members(self, all_members=False): pass + def resolve_name(self, modname, parents, path, base): + if modname is not None: + return modname, parents + [base] + return (path or '') + base, [] + + #autodoc.add_documenter(DocstringOnlyModuleDocumenter) def setup(app): -- cgit v1.2.1