You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all! I've just discovered this awesome package and was giving it a try when I found something that doesn't fit (for me at least): I'm working on a project with many sub-folders inside without using init.py other than in the top level one. When I trigger pdoc, none of the sub-modules get documented. Including empty init.py files in each sub folder solves the problem, but I found it quite odd (since python does not need that in order to work properly).
Thanks in advance!
Steps to reproduce the behavior:
Project with many sub-folders without init.py files
Triggering pdoc does not generate documentation for files un those folders
Including init.py files in each sub folder solves the problem
I agree it's all a bit confusing, but for pdoc it boils down to the fact that pkgutil.walk_packages - which we use to discover packages - does not pick up namespace packages. See also: python/cpython#73444
Long story short, there's not much we can do here. I'd really recommend to add __init__.py files. As a workaround, you could maybe list all the sub-packages explicitly. Hope this helps!
Problem Description
Hi all! I've just discovered this awesome package and was giving it a try when I found something that doesn't fit (for me at least): I'm working on a project with many sub-folders inside without using init.py other than in the top level one. When I trigger pdoc, none of the sub-modules get documented. Including empty init.py files in each sub folder solves the problem, but I found it quite odd (since python does not need that in order to work properly).
Thanks in advance!
Steps to reproduce the behavior:
System Information
pdoc: 12.0.2
Python: 3.10.2
Platform: Linux-5.13.0-48-generic-x86_64-with-glibc2.31
The text was updated successfully, but these errors were encountered: