Boolean and `None` comparisons should be done with `is` not `==`.
Remove trailing white-space.
Two spaces before in-line comment.