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

Pylance stops working randomly #6829

Open
luabud opened this issue Jan 7, 2025 · 2 comments
Open

Pylance stops working randomly #6829

luabud opened this issue Jan 7, 2025 · 2 comments
Assignees
Labels
bug Something isn't working needs repro Issue has not been reproduced yet waiting for user response Requires more information from user

Comments

@luabud
Copy link
Member

luabud commented Jan 7, 2025

From marketplace review:

it's a bit unstable sometimes, I've had some features stop working randomly

@luabud luabud added bug Something isn't working waiting for user response Requires more information from user labels Jan 7, 2025
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Jan 7, 2025
@heejaechang
Copy link
Contributor

can we talk to customer?

@spokeydokeys
Copy link

I did not report this (or comment on it in the market place) but have experienced it and seen it with my colleagues too. It seems to be a relatively new issue.

The behavior is that I'm making changes to code and pylance will underline code, but even after I have satisfied the issue it continues to underline the code. For example, I was working with os.getenv earlier today in a situation like:

import os
from typing import Optional

def my_func(val: Optional[dict[str, str]] = None):
    if val is None:
        val = {"key": os.getevn("myVar")}
    ...

It correctly identified that in this case val could be [str, str | None] and underlined it. I changed the assignment to be os.getenv("myVar", "") but pylance still underlined it, even after file save or file modification then save. The only way to get it to re-evaluate this is to restart the language server (or all of VScode).

I have checked the language server outputs and not seen any obvious errors. Is there another place to look for clues?

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 waiting for user response Requires more information from user
Projects
None yet
Development

No branches or pull requests

4 participants