timothycrosley / portray

Your Project with Great Documentation.
MIT License
860 stars 72 forks source link

Support for implicit namespace packages #104

Open dragondive opened 1 year ago

dragondive commented 1 year ago

Portray does not seem to recognize Implicit Namespace Packages. [see PEP 420]

Consider below directory structure:

project_root_directory
├── pyproject.toml
├── ...
└── src/
    └── mypkg/
            ├── subpkg1/
            └── subpkg2/
                    └── __init__.py

If you generate documentation for the mypkg module, portray correctly identifies subpkg2 as a submodule. However, it doesn't recognize subpkg1 as a submodule because there's no __init__.py file inside it.

It would be useful if portray can also identify the implicit namespace packages as submodules.