Correct flake8 E711 and E712 violations

Bug #1305377 reported by Henry Gessau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Henry Gessau

Bug Description

Enable flake8 checking for
E711 comparison to False should be 'if cond is False:' or 'if not cond:'
E712 comparison to True should be 'if cond is True:' or 'if cond:'

Henry Gessau (gessau)
Changed in neutron:
assignee: nobody → Henry Gessau (gessau)
summary: - Correct pep8 E711 and E712 violations
+ Correct flake8 E711 and E712 violations
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/86494

Changed in neutron:
status: New → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/86494
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=dda6c89202b015628f74101839301424001a6c63
Submitter: Jenkins
Branch: master

commit dda6c89202b015628f74101839301424001a6c63
Author: Henry Gessau <email address hidden>
Date: Wed Apr 9 22:49:50 2014 -0400

    Enable flake8 E711 and E712 checking

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

    Most violations were in DB queries. Replace as follows:
      False -> sqlalchemy.sql.false()
      None -> sqlalchemy.sql.null()
      True -> sqlalchemy.sql.true()

    Change-Id: Iff54747b70f504d5466cfdc6e2ec4d7a0f9ddb7c
    Closes-bug: #1305377

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.