Test for object identity should be 'is not' (E714)
Tests for object identity should use the form x is not None
rather than not x is None
. The former example is simply more readable.
Anti-pattern
if not user is None:
print(user.name)
Best practice
if user is not None:
print(user.name)