From e219f8ec3676bf0320e066168509a85f5d370153 Mon Sep 17 00:00:00 2001 From: Joshua Powers Date: Thu, 28 May 2020 13:41:35 -0700 Subject: [PATCH] test: ignore flake8 E402 errors in main.py This puts an ignore on the imports not at the top of the file errors. The reason for the ignore instead of fix is that the file is using imp to grab a lock and patch logging before further imports are completed. --- tox.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 611c3111312..5befd8eb871 100644 --- a/tox.ini +++ b/tox.ini @@ -48,12 +48,13 @@ deps = -r{toxinidir}/test-requirements.txt # E126: continuation line over-indented for hanging indent # E226: missing whitespace around arithmetic operator # E241: multiple spaces after ‘,’ -# E402: module level import not at top of file # E741: do not use variables named ‘l’, ‘O’, or ‘I’ # W503: line break before binary operator # W504: line break after binary operator -ignore=E121,E123,E126,E226,E241,E402,E741,W503,W504 +ignore=E121,E123,E126,E226,E241,E741,W503,W504 exclude = .venv,.tox,dist,doc,*egg,.git,build,tools +per-file-ignores = + cloudinit/cmd/main.py:E402 [testenv:doc] basepython = python3