Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntelliSense for Search Paths doesn't work when import folder outside the workspace. #7793

Closed
zhouwangyang opened this issue Dec 14, 2023 · 1 comment

Comments

@zhouwangyang
Copy link
Contributor

zhouwangyang commented Dec 14, 2023

image

Steps to Reproduce
1.Open a folder as workspace in SE.
2.Add new python file in SE named WholsRunningMe.py.
3.Select a python environment from the python toolbar to open PythonSettings.json and you can check “Show All Files” on the toolbar to reveal local settings.
4.Create a folder named folder1 in your local, such like : C:\project\Temp\searchpath\folder1
5.Add __init__.py in folder1 and type some code in __init__.py
def FOLDER1_MSG(): print("hello world!")
6.Add searchpaths in PythonSettings.json.
image
7.Type code below in WholsRunningMe.py
import folder1 folder1.FOLDER1_MSG()
7.Press F5 the output is :hello world!
8.Change using the incorrect SearchPaths to import a module that doesn’t exist in one of your environments.
image
9.You should see IntelliSense show squiggles on the import statement and if change to correct SearchPaths the squiggles should go away.

Expected behavior
after change to the incorrect search path outside the workspace, the IntelliSense should show squiggles on the import statement and if change to correct SearchPaths the squiggles should go away.

Actual behavior
after change to the incorrect search path outside the workspace, the IntelliSense does not show squiggles on the import statement and if change to correct SearchPaths the squiggles should go away.

repro gif

@zhouwangyang
Copy link
Contributor Author

duplicate as #7771

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants