From 6b4974d995efcd95a0c222f4480d6ecb7768095a Mon Sep 17 00:00:00 2001 From: enkore Date: Wed, 10 Feb 2016 19:06:26 +0100 Subject: [PATCH] docs: fix wrong package name of submodules This showed up with the backends of mail and updates, where the docs claimed that e.g. the Thunderbird backend class was actually located in i3pystatus.thunderbird (correct: i3pystatus.mail.thunderbird) --- docs/module_docs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/module_docs.py b/docs/module_docs.py index e415fa9..e163dd7 100644 --- a/docs/module_docs.py +++ b/docs/module_docs.py @@ -97,16 +97,16 @@ def process_signature(app, what, name, obj, options, signature, return_annotatio return ("", return_annotation) -def get_modules(path, name): +def get_modules(path, package): modules = [] for finder, modname, is_package in pkgutil.iter_modules(path): if modname not in IGNORE_MODULES: - modules.append(get_module(finder, modname)) + modules.append(get_module(finder, modname, package)) return modules -def get_module(finder, modname): - fullname = "i3pystatus.{modname}".format(modname=modname) +def get_module(finder, modname, package): + fullname = "{package}.{modname}".format(package=package, modname=modname) return (modname, finder.find_loader(fullname)[0].load_module(fullname))