Replace None comparisons in SQLAlchemy code
SQLAlchemy requires '==' to compare to None, but using '== None' comparisons triggers the pep8 error E711. Another way to do '==' comparisons for SQLAlchemy is using its is_() method. This patch replaces all '== None' comparisons with 'is_(None)', which does not trigger the pep8 error. Because there are no more E711 vialotions left, this patch also removes E711 from the pep8 ignore list in tox.ini. Change-Id: I96bd835688176c87d3f8079421c3394c1d431d43
This commit is contained in:
2
tox.ini
2
tox.ini
@@ -94,8 +94,6 @@ commands =
|
||||
/bin/bash {toxinidir}/functionaltests/pretty_tox.sh '{posargs}'
|
||||
|
||||
[flake8]
|
||||
# E711 ignored because of sqlalchemy override of == None
|
||||
ignore = E711
|
||||
exclude = .git,.idea,.tox,bin,dist,debian,rpmbuild,tools,*.egg-info,*.eggs,*openstack/common,contrib,
|
||||
functionaltests,*alembic_migrations/versions,*docs/target,*.egg
|
||||
|
||||
|
||||
Reference in New Issue
Block a user