not sure why I always struggle with relative imports…
usually I have this structure
- project
- package1
some.py
- package2
- tests
tests_package1.py
where tests_package1.py starts with
from ..packe1.some import some
however I get “attempted relative import with no known parent package” and depening on where I have which init.py other errors.
here I found many suggestions but all fail in one or the other way
how to correctly import a class some in some.py to the tets_package1.py ?