It is possible that the target of your section of code has a "setter method", so it looks like you assign "my_var", but you actually call the method " my_var= ". See if your code has such definitions:
def my_var=(x)
If so, you will need to change the name of the local variable "my_var" or the setter method. You can also check by entering the line where you call " my_var = false ".
source share