Can sphinx .. automodule :: and other automatic functions be used to document modules that include from x import * statements, not including all documentation from imported modules?
EDIT: According to the point mzjn, if the attribute of the imported __module__ methods __module__ not match the module name, they should not be documented. However, for some of my modules they are.
my MLE is just a test_doc.py file with the following line:
from pylab import *
and documentation:
.. automodule:: agpy.test_doc :members:
If I include this line in test_doc.py :
print "beta.__module__:",beta.__module__
I get the expected result:
beta.__module__: None
Any idea what is going on? Can I screw something in conf.py ?
EDIT: workaround, according to mzjn's answer, change the __module__ attribute of those functions that have __module__==None :
import pylab from pylab import * for k,v in pylab.__dict__.iteritems(): if hasattr(v,'__module__'): if v.__module__ is None: locals()[k].__module__ = 'pylab'
source share