global-variable-not-assigned / W0602#
Using global for %r but no assignment is done
Used when a variable is defined through the "global" statement but no assignment to this variable is done.
TOMATO = "black cherry" def update_tomato(): global TOMATO TOMATO = "moneymaker"
TOMATO = "black cherry" def update_tomato(): global TOMATO # [global-variable-not-assigned] print(TOMATO)
Created by the variables checker.