From 82f0ceb724e93ccf22140762c65da88c9c2f4bb4 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Tue, 2 Jun 2020 16:58:53 -0500 Subject: Add flake8-import-order extension This adds the import order extension to match what we have in the cinder repo. This is a linting extension that will check that imports are in the correct order and the correct grouping so they automatically get flagged, and it won't be whether reviewers notice and decide to do anything or not. Cinder change was Ic13ba238a4a45c6219f4de131cfe0366219d722f for a little more wordy reasoning. Also includes updates for noqa tags. Newer version of the linters appear to want these on the function definition line, not on the decorator line. Change-Id: Ibf3f3afbf3bb6ec6613b35f91d4a353c6a391f41 Signed-off-by: Sean McGinnis --- tox.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini index a123070..d66d486 100644 --- a/tox.ini +++ b/tox.ini @@ -109,7 +109,9 @@ commands = {[testenv:functional]commands} [flake8] show-source = True ignore = H404,H405,E122,E123,E128,E251,W504 -exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build +exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build +application-import-names = cinderclient +import-order-style = pep8 [doc8] ignore-path=.tox,*.egg-info,doc/src/api,doc/source/drivers.rst,doc/build,.eggs/*/EGG-INFO/*.txt,doc/source/configuration/tables,./*.txt,releasenotes/build,doc/source/cli/details.rst -- cgit v1.2.1