Roman Donchenko
Roman Donchenko
> I don't get it. Isn't the linter warning correct in your case? Assignment is not guaranteed, isn't it? `used-before-assignment` should only be emitted if a variable is _definitely_ unassigned,...
Interestingly, bisect shows that this was introduced by commit 67bfab41b6a830cbab669b4eb15204690c64846d, which added the `possibly-used-before-assignment` warning.
An even simpler reproducer: ```python # pylint: disable=missing-docstring def foobar(x): if x != 0: v = None if x == 1: print(v) else: v = None ```
I submitted a more radical fix here: #8596. Mind taking a look?