fossasia / open-event-server

Consider using identity comparison with singleton PTC-W0068
Bug risk
Major
4 occurrences in this check
Comparison to singleton None should be expr is None
 94        or_(
 95            Speaker.icon_image_url == None,  # noqa: E711
 96            Speaker.small_image_url == None,
 97            Speaker.thumbnail_image_url == None, 98        ),
 99    ).all()
100
Comparison to singleton None should be expr is None
 93        Speaker.photo_url.isnot(None),
 94        or_(
 95            Speaker.icon_image_url == None,  # noqa: E711
 96            Speaker.small_image_url == None, 97            Speaker.thumbnail_image_url == None,
 98        ),
 99    ).all()
Comparison to singleton None should be expr is None
 81        or_(
 82            Event.thumbnail_image_url == None,  # noqa: E711
 83            Event.large_image_url == None,
 84            Event.icon_image_url == None, 85        ),
 86    ).all()
 87    logger.info('Resizing images of %s events...', len(events))
Comparison to singleton None should be expr is None
 80        Event.original_image_url.isnot(None),
 81        or_(
 82            Event.thumbnail_image_url == None,  # noqa: E711
 83            Event.large_image_url == None, 84            Event.icon_image_url == None,
 85        ),
 86    ).all()