← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cristiangsp/launchpad:fixing-e402-fix into launchpad:master

 

Cristian Gonzalez has proposed merging ~cristiangsp/launchpad:fixing-e402-fix into launchpad:master.

Commit message:
Skipping E402 in importpedant.py

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cristiangsp/launchpad/+git/launchpad/+merge/406656

Skipping E402 in importpedant.py
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cristiangsp/launchpad:fixing-e402-fix into launchpad:master.
diff --git a/lib/lp/scripts/utilities/importpedant.py b/lib/lp/scripts/utilities/importpedant.py
index 160af05..fd998aa 100644
--- a/lib/lp/scripts/utilities/importpedant.py
+++ b/lib/lp/scripts/utilities/importpedant.py
@@ -5,19 +5,20 @@ import atexit
 import itertools
 from operator import attrgetter
 import types
-import warnings
 
 import six
 from six.moves import builtins
 
+
+original_import = builtins.__import__
+naughty_imports = set()
+
 # Silence bogus warnings from Hardy's python-pkg-resources package.
+import warnings # noqa: E402
 warnings.filterwarnings('ignore', category=UserWarning, append=True,
                         message=r'Module .*? is being added to sys.path')
 
 
-original_import = builtins.__import__
-naughty_imports = set()
-
 # Sometimes, third-party modules don't export all of their public APIs through
 # __all__. The following dict maps from such modules to a list of attributes
 # that are allowed to be imported, whether or not they are in __all__.

Follow ups