pep8: E712 comparison to True should be 'if cond is True:' or 'if cond:'
pep8: E712 comparison to False should be 'if cond is False:' or 'if not cond:'