I have the following file structure:
├── README.md
├── apps
│ ├── fire_analysis.py
│ └── rois.py
└── streamlit_app.py
from apps import fire_analysis
from .apps import rois
print(rois.the_object)
the_object = 42 # the object that I want
The code works just fine. But I am getting the E0402: Attempted relative import beyond top-level package (relative-beyond-top-level)
error warning from pylint.
How to resolve this warning?
Am I doing the importing the wrong way in the fire_analysis.py
?
It works for me to change the import of apps/fire_analysis.py
to
from . import rois
telling python to search locally.