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)
This commit is contained in:
enkore 2016-02-10 19:06:26 +01:00
parent 13a291ce35
commit 6b4974d995

View File

@ -97,16 +97,16 @@ def process_signature(app, what, name, obj, options, signature, return_annotatio
return ("", return_annotation) return ("", return_annotation)
def get_modules(path, name): def get_modules(path, package):
modules = [] modules = []
for finder, modname, is_package in pkgutil.iter_modules(path): for finder, modname, is_package in pkgutil.iter_modules(path):
if modname not in IGNORE_MODULES: if modname not in IGNORE_MODULES:
modules.append(get_module(finder, modname)) modules.append(get_module(finder, modname, package))
return modules return modules
def get_module(finder, modname): def get_module(finder, modname, package):
fullname = "i3pystatus.{modname}".format(modname=modname) fullname = "{package}.{modname}".format(package=package, modname=modname)
return (modname, finder.find_loader(fullname)[0].load_module(fullname)) return (modname, finder.find_loader(fullname)[0].load_module(fullname))