[Django]-Can this variable really be "referenced before assignment"

0👍

It seems this warning should not happen, at least I can’t see why, maybe PyCharm has a problem figuring out the scope of the with block. But you may silence this warning by moving the ModelForm assignment in the with block.

Leave a comment