From 7f1ed6a71bf3bb3c1faf22bbedbe412d8334ad71 Mon Sep 17 00:00:00 2001 From: Hong Hui Xiao Date: Sat, 11 Feb 2017 12:00:48 +0800 Subject: [PATCH] Add H301 check to pep8 [H301] Do not import more than one module per line (*) is now in the ignore list of dragonflow pep8 check. However, [1] and some following work has cleaned the dragonflow import code. So, we can add the check in pep8 for future code. [1] https://review.openstack.org/#/c/360956/ Change-Id: Ib583f8be57cc1976d868433613f70378d8809f0d Partial-Bug: #1663864 (cherry picked from commit 17496f11ad5fabf0f91f6475efe62ff41df543ad) --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 1b2faf9b0..7374c0217 100644 --- a/tox.ini +++ b/tox.ini @@ -55,7 +55,7 @@ commands = sphinx-build -W -b html doc/source doc/build/html # H405 multi line docstring summary not separated with an empty line # H904 Wrap long lines in parentheses instead of a backslash # N530 Direct neutron imports not allowed -ignore = E126,E128,E129,E265,H301,H404,H405,H904,N530 +ignore = E126,E128,E129,E265,H404,H405,H904,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* @@ -68,4 +68,5 @@ commands = pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron} [hacking] +import_exceptions = dragonflow._i18n local-check-factory = neutron_lib.hacking.checks.factory