Open ElementalWarrior opened 8 months ago
Do you have only one venv folder in your project folder? I had a similar problem when upgrading Python: I recreated venv and until I deleted the old one, Pylance kept suggesting things based on the old version, not a new one. May be your case is similar, just the expected version is lower than the other one, not higher, like in my case.
Hey @YakovL, thanks for posting, but your issue seems like a different one with choosing interpreter, could you create a new issue and include a log as described under "Filing an issue" in the troubleshooting guide?
I think it is a bug in our side. we should set pep604Printing
option properly based on python version.
Pylance version: v2023.11.10 OS: Manjaro, 6.6.1-arch1-1-g14 Python version: VSCode interpreter set to 3.8.9, native OS version 3.11.5
Environment data
pyproject.toml includes:
Code Snippet
Repro Steps
Turn on pylance inlay hints
Expected behavior
Python versions less than 3.10 suggest type hints such as
Optional[int]
instead of int | None.Actual behavior
Python inlay hints suggest
int | None
for hinting, which is not supported by python3.8Logs
vscode python language server output logging:
When running python code: