Add H233 to pep8 check

H233 will report error when print is used as operator.
print operator has been removed in py3. We should add H233 check
as py3 is in the support list. This problem was first found at [1]
We can launch the check for future code.

[1] https://review.openstack.org/#/c/396915/

Change-Id: I4fef99c24941f048fd61a808e03869bacd30c001
Co-Authored-By: Wang Jian <wangjian38@huawei.com>
Partial-Bug: #1663864
This commit is contained in:
Hong Hui Xiao 2017-02-11 11:18:10 +08:00
parent 87d5639d08
commit f05852e710
2 changed files with 3 additions and 4 deletions

View File

@ -72,11 +72,11 @@ def check_dhcp_ip_rule(flows, dhcp_ip):
def print_command(full_args, run_as_root=False):
print '{}'.format(agent_utils.execute(
print ('{}'.format(agent_utils.execute(
full_args,
run_as_root=run_as_root,
process_input=None,
))
)))
class OvsFlowsParser(object):

View File

@ -55,10 +55,9 @@ commands = python setup.py build_sphinx
# H404 multi line docstring should start with a summary
# H405 multi line docstring summary not separated with an empty line
# H904 Wrap long lines in parentheses instead of a backslash
# H233 Python 3.x incompatible use of print operator
# N342 String interpolation should be delayed at logging calls
# N530 Direct neutron imports not allowed
ignore = E126,E128,E129,E265,H301,H404,H405,H904,H233,N342,N530
ignore = E126,E128,E129,E265,H301,H404,H405,H904,N342,N530
show-source = true
# TODO(dougw) neutron/tests/unit/vmware exclusion is a temporary services split hack
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios,neutron/tests/unit/vmware*