importing within the same package
justdanyul opened this issue · 0 comments
justdanyul commented
Say I have the following directory structure
- package_name
- module1.py
- module2.py
- docs/
- index.md
mkdocs.yml
and i have
... snip ...
plugins:
- search
- mkapi:
src_dirs: [package]
in my mkdocs.yml
. And say we have two classes, ClassFirst in module1.py and ClassSecond in module2.py, if I now add docstrings to ClassFirst and do mkdocs build
, everything works and my documentation is generated.
Actual problem
If i now where to import ClassSecond into module1.py , everything breaks. It doesn't matter if I use
from package_name.module2 import ClassSecond
or
from .module2 import ClassSecond
I import different from other modules within the same package all the time, doesn't mkapi
support this?