Skip to content

Commit ff3d2dd

Browse files
committed
Handle subpackages better
1 parent a7f0b38 commit ff3d2dd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

doc/make.py

+6
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ def _process_single_doc(self, single_doc):
135135
try:
136136
obj = pandas # noqa: F821
137137
for name in single_doc.split('.'):
138+
try:
139+
# for names not in the top-level namespace by default,
140+
# e.g. pandas.io.formats.style.Styler
141+
importlib.import_module('.'.join([obj.__name__, name]))
142+
except ModuleNotFoundError:
143+
pass
138144
obj = getattr(obj, name)
139145
except AttributeError:
140146
raise ValueError('Single document not understood, it should '

0 commit comments

Comments
 (0)