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

Python version from pyrightconfig.json is not shown to the user #6345

Open
rchiodo opened this issue Sep 3, 2024 · 0 comments
Open

Python version from pyrightconfig.json is not shown to the user #6345

rchiodo opened this issue Sep 3, 2024 · 0 comments
Assignees
Labels
bug Something isn't working needs repro Issue has not been reproduced yet

Comments

@rchiodo
Copy link
Contributor

rchiodo commented Sep 3, 2024

Create a pyproject.toml like so:

[tool.pyright]
pythonVersion = "3.9"
typeCheckingMode = "basic"

Create a venv with a newer version of python, say 3.11

Open a python file and add some code like so:

from typing import Literal, overload, reveal_type

Pick 3.11 as your venv in VS code.

Expected result:
Reveal_type is found because currently using 3.11

Actual result:

Image

The disconnect here is that the interpreter says 3.11 but the error messages are generated from the minimum version. The user has no way to know that's why there's an error.

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Sep 3, 2024
@KacieKK KacieKK added the bug Something isn't working label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

2 participants