SQLAlchemy “is not” behaviour

If you want to use != but lint complains, use isnot instead.
See this reference for more details.