summaryrefslogtreecommitdiff
path: root/compute
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2014-11-26 02:50:43 -0500
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-11-27 00:41:51 +0000
commitb3a8ca16486ed7dc760fe5317a86764c2794b54c (patch)
tree8cee9a8212b6ffba4bfda724f11dbf95dbc01887 /compute
parent15f79aeeb6426e5a2e77e01d6d713abfbd7e9135 (diff)
downloadchromite-b3a8ca16486ed7dc760fe5317a86764c2794b54c.tar.gz
lint: compute: fix whitespace issues
BUG=chromium:431514 TEST=no more lint errors Change-Id: I41486c2f473f80143ec6f548863794ae75f50534 Reviewed-on: https://chromium-review.googlesource.com/231961 Reviewed-by: Yu-Ju Hong <yjhong@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'compute')
-rw-r--r--compute/compute_configs.py18
-rw-r--r--compute/cros_compute.py10
-rw-r--r--compute/gcloud.py4
-rw-r--r--compute/setup_bot.py8
4 files changed, 16 insertions, 24 deletions
diff --git a/compute/compute_configs.py b/compute/compute_configs.py
index 27de31f3c..7ab3321aa 100644
--- a/compute/compute_configs.py
+++ b/compute/compute_configs.py
@@ -4,8 +4,6 @@
"""This module contains Google Compute Engine configurations."""
-# pylint: disable=bad-whitespace
-
from __future__ import print_function
from chromite.cbuildbot import constants
@@ -33,16 +31,16 @@ configs = {}
# The default config for Chrome OS builders.
configs['cros-bot'] = dict(
- machine_type = 'n1-highmem-16',
- zone = DEFAULT_ZONE,
- image = DEFAULT_IMAGE_NAME,
- scopes= DEFAULT_SCOPES,
+ machine_type='n1-highmem-16',
+ zone=DEFAULT_ZONE,
+ image=DEFAULT_IMAGE_NAME,
+ scopes=DEFAULT_SCOPES,
)
# A wimpy config for testing purposes.
configs['cros-test'] = dict(
- machine_type = 'n1-standard-1',
- zone = DEFAULT_ZONE,
- image = DEFAULT_IMAGE_NAME,
- scopes= DEFAULT_SCOPES,
+ machine_type='n1-standard-1',
+ zone=DEFAULT_ZONE,
+ image=DEFAULT_IMAGE_NAME,
+ scopes=DEFAULT_SCOPES,
)
diff --git a/compute/cros_compute.py b/compute/cros_compute.py
index dd808b213..8fd3b7673 100644
--- a/compute/cros_compute.py
+++ b/compute/cros_compute.py
@@ -4,8 +4,6 @@
"""Script to run Chrome OS-specific GCE commands ."""
-# pylint: disable=bad-continuation
-
from __future__ import print_function
import logging
@@ -58,14 +56,14 @@ def BotifyInstance(instance, project, zone):
gcctx.SSH(instance, cmd='umask 0022')
# Set up buildbot user and grant it sudo rights.
gcctx.SSH(instance,
- cmd='sudo adduser --disabled-password --gecos "" %s'
- % bot_constants.BUILDBOT_USER)
+ cmd=('sudo adduser --disabled-password --gecos "" %s'
+ % bot_constants.BUILDBOT_USER))
gcctx.SSH(instance,
cmd='sudo adduser %s sudo' % bot_constants.BUILDBOT_USER)
gcctx.SSH(
instance,
- cmd='sudo awk \'BEGIN{print "%%%s ALL=NOPASSWD: ALL" >>"/etc/sudoers"}\''
- % bot_constants.BUILDBOT_USER)
+ cmd=('sudo awk \'BEGIN{print "%%%s ALL=NOPASSWD: ALL" >>"/etc/sudoers"}\''
+ % bot_constants.BUILDBOT_USER))
# Copy bot credentials to a temporay location.
dest_path = bot_constants.BOT_CREDS_TMP_PATH
diff --git a/compute/gcloud.py b/compute/gcloud.py
index 0f814c17b..70f579089 100644
--- a/compute/gcloud.py
+++ b/compute/gcloud.py
@@ -4,8 +4,6 @@
"""Library for gcloud operations."""
-# pylint: disable=bad-whitespace
-
from __future__ import print_function
import logging
@@ -136,7 +134,7 @@ class GCContext(object):
"""Lists all instances."""
return self.DoCommand(['images', 'list'], **kwargs)
- def CreateImage(self, image, source_uri=None, disk=None, **kwargs):
+ def CreateImage(self, image, source_uri=None, disk=None, **kwargs):
"""Creates an image from |source_uri| or |disk|.
Args:
diff --git a/compute/setup_bot.py b/compute/setup_bot.py
index 8aaa04b33..d26d35738 100644
--- a/compute/setup_bot.py
+++ b/compute/setup_bot.py
@@ -4,9 +4,6 @@
"""Should be run on a GCE instance to set up the build environment."""
-# pylint: disable=bad-continuation
-# pylint: disable=bad-whitespace
-
from __future__ import print_function
import getpass
@@ -17,6 +14,7 @@ from chromite.compute import bot_constants
from chromite.lib import cros_build_lib
from chromite.lib import osutils
+
# Make the script more readable.
RunCommand = cros_build_lib.RunCommand
SudoRunCommand = cros_build_lib.SudoRunCommand
@@ -114,7 +112,7 @@ def _SetupGoB():
def _SetupCIDB():
"""Copies cidb credentials."""
RunCommand(
- ['cp','-r', os.path.join(BOT_CREDS_PATH, bot_constants.CIDB_CREDS_DIR),
+ ['cp', '-r', os.path.join(BOT_CREDS_PATH, bot_constants.CIDB_CREDS_DIR),
HOME_DIR])
@@ -181,7 +179,7 @@ def SetupBuildbotEnvironment():
def main(_argv):
assert getpass.getuser() == bot_constants.BUILDBOT_USER, (
'This script should be run by %s instead of %s!' % (
- bot_constants.BUILDBOT_USER, getpass.getuser()))
+ bot_constants.BUILDBOT_USER, getpass.getuser()))
SetupPrerequisites()
InstallChromeDependencies()
SetupCredentials()