microsoft / python-language-server

Microsoft Language Server for Python
Apache License 2.0
912 stars 131 forks source link

Undefined variables #1846

Open CMLL opened 4 years ago

CMLL commented 4 years ago

Environment data

Expected behaviour

Recently declared variables are recognized.

Actual behaviour

Getting undefined variables one line after the variable is declared. Think this is happening mostly with version 0.5.10, at least I didn't noticed it before the update.

Code Snippet / Additional lnformation

image

MikhailArkhipov commented 4 years ago

Is this still a problem?

CMLL commented 4 years ago

Yes, but after observing the problem more, I believe all my issues stem from the same issue. https://github.com/microsoft/python-language-server/issues/1755 https://github.com/microsoft/python-language-server/issues/1502

I have some sort of construct in the code I work on, I believe is a import loop of some kind, that makes the LS go extremely high on virtual memory, prevents it from closing correctly when the client is closed. When this state is reached, the analysis message gets stuck in there and the undefined variables problems arise when trying to use this client.

I think all my issues could be condensed into one.