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

fixed Uri to use value check rather than reference check. #9665

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

heejaechang
Copy link
Collaborator

@heejaechang heejaechang commented Jan 7, 2025

fixed #9610

this code wrongly used reference check rather than value check for uri. when things were working, this code happens to get the same Uri instance so it worked or hid the bug, but now, code changes changed it to get a different instance of uri with the same value causing it to fail.

fixed the bug by using proper equals method instead of !==

...

this makes behavior to the same as before. but that said, what user did is a bit weird.

echo "/home/rgoya/pyright_test" > $CONDA_PREFIX/lib/python3.*/site-packages/pyright_test.pth

this basically makes whole workspace folder as 3rd party library folder. making it ambiguous to pyright whether it should think files under the workspace root as user files or 3rd party files.

right now, behavior is what it is, but not sure whether that's by design or just behavior of what happens to be the current implementation does.

@heejaechang heejaechang merged commit b0bd5bf into microsoft:main Jan 7, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pyright can't resolve same-directory imports when having a pyproject.toml and a .pth file.
3 participants