Fix PEP8 E712 issues (cmp to True should be ‘if cond is True:’ or ‘if cond:’)
Misc PEP8 fixes.