I'm working on a huge spaghetti code project and currently I've found many bugs where a string value is being compared to a boolean variable which is wrong.
Is there a python library which I can use like pylint which can spit out all errors or possible errors? Especially when a variable is overwritten with a new value.
Also, I found same type of errors a month later in the code.
What library can I use to catch all possible runtime problems?
E.g.:
var= "true"
bool_var= True
if var == bool_var:
print("yes")
else:
print("no")
The above example should give a warning or an error!