pycharm does not detect undefined variables

已回答

[kinda-SOLVED]

hello,

suddenly, pycharm no longer flags undefined variables.

any idea how to fix this?

in the settings, undefined variables are checked to be inspected.

other posts suggest to switch interpreters, but the issue persists.

also, suggest to delete the interpreter and create new one... did not do that yet.

EDIT: just deleted it. and create a new one, but the issue is still there.

 

Manually starting the inspection for undefined variables over a file does not yield any results.

 

upgraded to 2021, and nothing:

PyCharm 2021.1.3 (Professional Edition)
Build #PY-211.7628.24, built on June 30, 2021
For educational use only.
Runtime version: 11.0.11+9-b1341.60 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 4.17.4-041704-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 1958M
Cores: 12
Non-Bundled Plugins: ClearCachePlugin (1.1)
Current Desktop: ubuntu-communitheme:ubuntu:GNOME

thanks

info:

PyCharm 2020.3.3 (Professional Edition)
Build #PY-203.7148.72, built on January 26, 2021
For educational use only.
Runtime version: 11.0.9.1+11-b1145.77 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 4.17.4-041704-generic
GC: ParNew, ConcurrentMarkSweep
Memory: 1892M
Cores: 12
Non-Bundled Plugins: ClearCachePlugin
Current Desktop: ubuntu-communitheme:ubuntu:GNOME

 

+==================

it turns out that the inspection is working....

but it was not working for a function in a file. that function has an if statement where the code inside the if is not reachable.  inside that function: a. before the if statement, things work. b. after the if statement, it does not work (but only inside that function).

sorry.

thanks

2

I have this same issue with PyCharm 2021.3.2 Build #PC-213.6777.50

I have tried all the solutions proposed here as well as adjusting and Editor->Inspections options.

0

请先登录再写评论。