Skip to content

Commit ba65fdc

Browse files
committed
BUG: Don't traverse obvious non-package subdirectories
Likely not fixes, but refs #99
1 parent 148237b commit ba65fdc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pdoc/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,10 @@ def iter_modules(paths):
583583
for file in os.listdir(pth):
584584
if file.startswith(('.', '__pycache__', '__init__.py')):
585585
continue
586-
if file.endswith(_SOURCE_SUFFIXES) or isdir(join(pth, file)):
586+
if file.endswith(_SOURCE_SUFFIXES):
587587
yield splitext(file)[0]
588+
if isdir(join(pth, file)) and '.' not in file:
589+
yield file
588590

589591
for root in iter_modules(self.obj.__path__):
590592
# Ignore if this module was already doc'd.

0 commit comments

Comments
 (0)