I have such project structure:
.
├── app.py
├── models
├── model1.py
├── model2.py
├── connectors.py
├── model1_connector.py
├── model2_connector.py
I start application using python app.py
.
Inside of app.py
I use
from models.model1 import Model1
from models.model1 import Model1
from connectors.model1_connector import Connector1
from connectors.model2_connector import Connector2
it works perfectly.
But in the connectors
I use next code:
from models.model1 import Model1
It works on running application, because I start application from .
and at start it can recognize all paths correctly. But when I'm working in VSCode its Intellisence craches: when I work in connectors.model1_connector
it can't find model
folder, because it is in parent folder! I can't use help, can't use Ctrl+click
, can't use Tab
and so on.
I know I can solve it using `sys.append('../' but I suppose it is not correct - I dont need it for real project to start I need it just for comfort work in VSCode!
What is the best solution here?