Pylance may pick the wrong root. Set python.analysis.extraPaths in .vscode/settings.json to include all package source directories:
: Press F1 , type Developer: Reload Window , and hit Enter to force Pylance to rescan your environment. pylance missing imports poetry link
To make the "missing imports" problem never return, automate the interpreter selection using a VS Code task that runs poetry install and extracts the environment path. Pylance may pick the wrong root
Leverages environment inheritance, zero config. Cons: You must always launch VS Code this way. Closing the parent terminal breaks the context. type Developer: Reload Window
Now go forth and code without the yellow squiggles.
Pylance reads .env files before analysis, giving it the missing context.