Comparison to True should be `if cond is True:` or `if cond:`