Let's suppose that I have a project with this file structure:
project_dir
└── src
├── package1
│ └── module1.py
└── package2
└── module2.py
When I want to use some class from module1 in some other module I type something like
class SomeNewClass(ClassFromModule1): # here I press ctrl-space to make auto-import
...
When Pylance makes auto-import it always takes it starting from the root directory of the project, so I got this auto-import:
from src.package1.module1 import ClassFromModule1
The problem is that my working directory is src and I want to get
from package1.module1 import ClassFromModule1
Is there any way to fix root path of the auto-import Pylance feature?