Add flake8 to the tidy process for Python files

Fixes #6236

Also included in this commit are the changes need to make flake8 pass
for the existing python file
This commit is contained in:
Corey Farwell 2015-06-03 20:29:13 -04:00
parent 907c051bd1
commit 848c57653c
15 changed files with 113 additions and 68 deletions

View file

@ -281,7 +281,6 @@ class MachCommands(CommandBase):
execfile(run_file, run_globals)
return run_globals["update_tests"](**kwargs)
def ensure_wpt_virtualenv(self):
virtualenv_path = path.join("tests", "wpt", "_virtualenv")
python = self.get_exec("python2", "python")
@ -295,8 +294,8 @@ class MachCommands(CommandBase):
execfile(activate_path, dict(__file__=activate_path))
try:
import wptrunner
from wptrunner.browsers import servo
import wptrunner # noqa
from wptrunner.browsers import servo # noqa
except ImportError:
subprocess.check_call(["pip", "install", "-r",
path.join("tests", "wpt", "harness", "requirements.txt")])
@ -311,7 +310,7 @@ class MachCommands(CommandBase):
# before the virtualenv is initalised it doesn't see the blessings module so we don't
# get coloured output. Setting the blessings global explicitly fixes that.
from mozlog.structured.formatters import machformatter
import blessings
import blessings # noqa
machformatter.blessings = blessings
def get_exec(self, name, default=None):