]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Enable flake8 E711 and E712 checking
authorHenry Gessau <gessau@cisco.com>
Thu, 10 Apr 2014 02:49:50 +0000 (22:49 -0400)
committerHenry Gessau <gessau@cisco.com>
Thu, 10 Apr 2014 03:03:57 +0000 (23:03 -0400)
commitdda6c89202b015628f74101839301424001a6c63
treead2d3d9f28e83eefd3f481932ceab85b03280abb
parentce7e53e5b50fb14c3b0afab78f89f2a1518ea795
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
neutron/db/db_base_plugin_v2.py
neutron/plugins/cisco/db/n1kv_db_v2.py
neutron/plugins/ml2/drivers/l2pop/db.py
neutron/plugins/nec/db/packetfilter.py
neutron/scheduler/dhcp_agent_scheduler.py
neutron/scheduler/l3_agent_scheduler.py
neutron/tests/unit/test_extension_portsecurity.py
tox.ini