From d2b05719a6163e874ca40234a0b85dc2fea260c0 Mon Sep 17 00:00:00 2001 From: Joshua Powers Date: Tue, 2 Jun 2020 06:58:24 -0700 Subject: test: ignore flake8 E402 errors in main.py (#402) 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 57b20568..725a0ca4 100644 --- a/tox.ini +++ b/tox.ini @@ -48,11 +48,12 @@ 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 # W503: line break before binary operator # W504: line break after binary operator -ignore=E121,E123,E126,E226,E241,E402,W503,W504 +ignore=E121,E123,E126,E226,E241,W503,W504 exclude = .venv,.tox,dist,doc,*egg,.git,build,tools +per-file-ignores = + cloudinit/cmd/main.py:E402 [testenv:doc] basepython = python3 -- cgit v1.2.3