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

Don't show stubPath xxx is not a valid directory warning when using config default #4917

Closed
debonte opened this issue Oct 4, 2023 · 1 comment
Assignees
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@debonte
Copy link
Contributor

debonte commented Oct 4, 2023

Repro Steps

  1. Ensure python.analysis.stubPath is not set in VS Code settings.
  2. Open a folder that does not contain a typings subdir

Expected behavior

Pylance (or Pyright) log does not contain the following warning. The warning should only be shown if the user explicitly provided a stubPath and that directory is not found.

[Warn  - 1:35:44 PM] (33924) stubPath c:\myproject\typings is not a valid directory.

Actual behavior

The warning is present.

This was discussed in the comments of microsoft/pyright#777. Suggested fix is to modify the workspace/configuration logic in the Pylance/Pyright client to return empty string for python.analysis.stubPath if it is not set, rather than returning the default value.

@debonte debonte added the bug Something isn't working label Oct 4, 2023
@debonte debonte self-assigned this Oct 4, 2023
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Oct 4, 2023
@debonte debonte removed the needs repro Issue has not been reproduced yet label Oct 4, 2023
@debonte debonte added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Oct 11, 2023
@heejaechang
Copy link
Contributor

This issue has been fixed in prerelease version 2023.10.21, which we've just released. You can find the changelog here: CHANGELOG.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

3 participants