From 8a234ebc557539b04c175e76ed3c9a19031f89ac Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Mon, 25 Jul 2016 15:11:10 -0400 Subject: [PATCH] Use flake8 3.0 style for import errors It worked in previous versions to put `noqa` on the non-import line that preceded the imports. As of flake8 3.0.0, we apparently need to ignore the import-after-non-import error on every `import` line. --- test/_common.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/_common.py b/test/_common.py index cfec6afb1..dac6c982a 100644 --- a/test/_common.py +++ b/test/_common.py @@ -27,15 +27,15 @@ from contextlib import contextmanager # Mangle the search path to include the beets sources. -sys.path.insert(0, '..') # noqa -import beets.library -from beets import importer, logging -from beets.ui import commands -from beets import util -import beets +sys.path.insert(0, '..') +import beets.library # noqa: E402 +from beets import importer, logging # noqa: E402 +from beets.ui import commands # noqa: E402 +from beets import util # noqa: E402 +import beets # noqa: E402 # Make sure the development versions of the plugins are used -import beetsplug +import beetsplug # noqa: E402 beetsplug.__path__ = [os.path.abspath( os.path.join(__file__, '..', '..', 'beetsplug') )]