In pycharm, I would like to disable the following inspection warn: "Local variable 'xxx' might be referenced before assignment" but I can't find it in settings/inspections.
PS: This is not a duplicate, as I understand this warn. I am just asking how to disable it in pycharm.
Update: Please find below an example of what I mean
cond = True def add1(x): return x+1 if cond: a = 1 if cond: b = add1(a) # the warn is on the 'a' Solution:
"Unbound local variable" inspection. (cf. Lomtrur answer below)
xxx? what causes this warning?if cond : var =fct1()and laterfct2(var)shows this warn. But I don't care, that's my coding style.aand press Alt+Enter? That should tell you which inspection you want to disable, or does that not work? What is your PyCharm version?