aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wick...@apache.org
Subject git commit: Fix checkstyle and add checkstyle back to jenkins.
Date Fri, 03 Oct 2014 16:41:33 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master 92cfd2011 -> ee4e428c1


Fix checkstyle and add checkstyle back to jenkins.

Testing Done:
build.sh

Reviewed at https://reviews.apache.org/r/26098/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/ee4e428c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/ee4e428c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/ee4e428c

Branch: refs/heads/master
Commit: ee4e428c12985fdf9c708e8733005e04d9a8a774
Parents: 92cfd20
Author: Brian Wickman <wickman@apache.org>
Authored: Fri Oct 3 09:38:54 2014 -0700
Committer: Brian Wickman <wickman@apache.org>
Committed: Fri Oct 3 09:38:54 2014 -0700

----------------------------------------------------------------------
 build-support/jenkins/build.sh                         |  3 +++
 .../python/apache/aurora/admin/host_maintenance.py     |  3 +--
 src/main/python/apache/aurora/client/api/__init__.py   |  3 ---
 .../apache/aurora/client/api/instance_watcher.py       |  2 +-
 .../python/apache/aurora/client/api/job_monitor.py     |  2 --
 .../apache/aurora/client/api/scheduler_client.py       |  2 +-
 .../python/apache/aurora/client/api/updater_util.py    |  4 ++--
 src/main/python/apache/aurora/client/cli/context.py    |  1 -
 src/main/python/apache/aurora/client/cli/cron.py       | 10 +---------
 src/main/python/apache/aurora/client/cli/jobs.py       |  7 ++++---
 .../apache/aurora/client/cli/standalone_client.py      |  1 -
 src/main/python/apache/aurora/client/cli/task.py       | 13 +------------
 src/main/python/apache/aurora/client/commands/core.py  |  2 +-
 .../apache/aurora/client/commands/maintenance.py       |  4 +---
 src/main/python/apache/aurora/client/commands/run.py   |  3 +--
 src/main/python/apache/aurora/client/commands/ssh.py   |  1 -
 .../apache/aurora/executor/common/health_checker.py    |  1 +
 src/main/python/apache/aurora/executor/gc_executor.py  |  1 -
 .../apache/aurora/tools/java/thrift_wrapper_codegen.py |  2 +-
 src/test/python/apache/aurora/client/api/test_api.py   |  1 -
 .../apache/aurora/client/api/test_scheduler_client.py  |  2 +-
 .../python/apache/aurora/client/api/test_updater.py    |  3 ---
 src/test/python/apache/aurora/client/cli/test_cron.py  |  7 +------
 .../python/apache/aurora/client/cli/test_update.py     |  1 -
 .../python/apache/aurora/client/commands/test_admin.py |  1 -
 .../python/apache/aurora/client/commands/test_kill.py  |  8 ++------
 .../apache/aurora/client/commands/test_maintenance.py  |  1 -
 .../python/apache/aurora/executor/test_gc_executor.py  |  1 -
 28 files changed, 23 insertions(+), 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/build-support/jenkins/build.sh
----------------------------------------------------------------------
diff --git a/build-support/jenkins/build.sh b/build-support/jenkins/build.sh
index 850e08b..1a664e2 100755
--- a/build-support/jenkins/build.sh
+++ b/build-support/jenkins/build.sh
@@ -23,3 +23,6 @@ date
 # Run all Python tests
 ./pants src/test/python:all -vxs
 
+# Run Python style checks
+./build-support/python/isort-check
+./build-support/python/checkstyle-check src

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/admin/host_maintenance.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/admin/host_maintenance.py b/src/main/python/apache/aurora/admin/host_maintenance.py
index b7b3397..9c2a9f7 100644
--- a/src/main/python/apache/aurora/admin/host_maintenance.py
+++ b/src/main/python/apache/aurora/admin/host_maintenance.py
@@ -13,7 +13,7 @@
 #
 
 from twitter.common import log
-from twitter.common.quantity import Amount, Time
+from twitter.common.quantity import Time
 
 from apache.aurora.admin.admin_util import format_sla_results, print_results
 from apache.aurora.client.api import AuroraClientAPI
@@ -37,7 +37,6 @@ class HostMaintenance(object):
 
   SLA_MIN_JOB_INSTANCE_COUNT = 20
 
-
   @classmethod
   def iter_batches(cls, hostnames, grouping_function=DEFAULT_GROUPING):
     groups = group_hosts(hostnames, grouping_function)

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/client/api/__init__.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/__init__.py b/src/main/python/apache/aurora/client/api/__init__.py
index e1dfee7..2630079 100644
--- a/src/main/python/apache/aurora/client/api/__init__.py
+++ b/src/main/python/apache/aurora/client/api/__init__.py
@@ -29,12 +29,9 @@ from .updater_util import UpdaterConfig
 from gen.apache.aurora.api.constants import LIVE_STATES
 from gen.apache.aurora.api.ttypes import (
     Identity,
-    JobKey,
     JobUpdateQuery,
     JobUpdateRequest,
     Lock,
-    LockKey,
-    LockValidation,
     ResourceAggregate,
     ResponseCode,
     TaskQuery

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/client/api/instance_watcher.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/instance_watcher.py b/src/main/python/apache/aurora/client/api/instance_watcher.py
index fe2f551..b390aa8 100644
--- a/src/main/python/apache/aurora/client/api/instance_watcher.py
+++ b/src/main/python/apache/aurora/client/api/instance_watcher.py
@@ -20,7 +20,7 @@ from twitter.common import log
 from .health_check import StatusHealthCheck
 from .task_util import StatusMuxHelper
 
-from gen.apache.aurora.api.ttypes import Identity, ResponseCode, ScheduleStatus, TaskQuery
+from gen.apache.aurora.api.ttypes import Identity, ScheduleStatus, TaskQuery
 
 
 class Instance(object):

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/client/api/job_monitor.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/job_monitor.py b/src/main/python/apache/aurora/client/api/job_monitor.py
index 756093d..18d5c03 100644
--- a/src/main/python/apache/aurora/client/api/job_monitor.py
+++ b/src/main/python/apache/aurora/client/api/job_monitor.py
@@ -14,8 +14,6 @@
 
 from threading import Event
 
-from thrift.transport import TTransport
-from twitter.common import log
 from twitter.common.quantity import Amount, Time
 
 from .task_util import StatusMuxHelper

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/client/api/scheduler_client.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/scheduler_client.py b/src/main/python/apache/aurora/client/api/scheduler_client.py
index b400cb2..311c954 100644
--- a/src/main/python/apache/aurora/client/api/scheduler_client.py
+++ b/src/main/python/apache/aurora/client/api/scheduler_client.py
@@ -19,7 +19,7 @@ import traceback
 
 from pystachio import Default, Integer, String
 from thrift.protocol import TJSONProtocol
-from thrift.transport import THttpClient, TTransport
+from thrift.transport import TTransport
 from twitter.common import log
 from twitter.common.quantity import Amount, Time
 from twitter.common.zookeeper.kazoo_client import TwitterKazooClient

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/client/api/updater_util.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/updater_util.py b/src/main/python/apache/aurora/client/api/updater_util.py
index 9bfc27d..2dd44e3 100644
--- a/src/main/python/apache/aurora/client/api/updater_util.py
+++ b/src/main/python/apache/aurora/client/api/updater_util.py
@@ -91,8 +91,8 @@ class UpdaterConfig(object):
         updateGroupSize=self.batch_size,
         maxPerInstanceFailures=self.max_per_instance_failures,
         maxFailedInstances=self.max_total_failures,
-        maxWaitToInstanceRunningMs=self.restart_threshold*1000,
-        minWaitInInstanceRunningMs=self.watch_secs*1000,
+        maxWaitToInstanceRunningMs=self.restart_threshold * 1000,
+        minWaitInInstanceRunningMs=self.watch_secs * 1000,
         rollbackOnFailure=self.rollback_on_failure,
         waitForBatchCompletion=self.wait_for_batch_completion,
         updateOnlyTheseInstances=self.instances_to_ranges(instances) if instances else None)

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/client/cli/context.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/context.py b/src/main/python/apache/aurora/client/cli/context.py
index f639af7..301531f 100644
--- a/src/main/python/apache/aurora/client/cli/context.py
+++ b/src/main/python/apache/aurora/client/cli/context.py
@@ -59,7 +59,6 @@ def bindings_to_list(bindings):
   return result
 
 
-
 class AuroraCommandContext(Context):
   """A context object used by Aurora commands to manage command processing state
   and common operations.

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/client/cli/cron.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/cron.py b/src/main/python/apache/aurora/client/cli/cron.py
index 33a6f91..061b1d4 100644
--- a/src/main/python/apache/aurora/client/cli/cron.py
+++ b/src/main/python/apache/aurora/client/cli/cron.py
@@ -16,13 +16,7 @@
 
 from __future__ import print_function
 
-from apache.aurora.client.cli import (
-    EXIT_COMMAND_FAILURE,
-    EXIT_INVALID_PARAMETER,
-    EXIT_OK,
-    Noun,
-    Verb
-)
+from apache.aurora.client.cli import EXIT_INVALID_PARAMETER, EXIT_OK, Noun, Verb
 from apache.aurora.client.cli.context import AuroraCommandContext
 from apache.aurora.client.cli.options import (
     BIND_OPTION,
@@ -33,8 +27,6 @@ from apache.aurora.client.cli.options import (
     JSON_READ_OPTION
 )
 
-from gen.apache.aurora.api.ttypes import ResponseCode
-
 
 class Schedule(Verb):
   @property

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/client/cli/jobs.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/jobs.py b/src/main/python/apache/aurora/client/cli/jobs.py
index 6605485..103fb53 100644
--- a/src/main/python/apache/aurora/client/cli/jobs.py
+++ b/src/main/python/apache/aurora/client/cli/jobs.py
@@ -30,7 +30,6 @@ from thrift.TSerialization import serialize
 from apache.aurora.client.api.job_monitor import JobMonitor
 from apache.aurora.client.api.updater_util import UpdaterConfig
 from apache.aurora.client.cli import (
-    EXIT_API_ERROR,
     EXIT_COMMAND_FAILURE,
     EXIT_INVALID_CONFIGURATION,
     EXIT_INVALID_PARAMETER,
@@ -71,6 +70,7 @@ WILDCARD_JOBKEY_OPTION = CommandOption('jobspec', type=arg_type_jobkey,
         metavar="cluster[/role[/env[/name]]]",
         help="A jobkey, optionally containing wildcards")
 
+
 class CancelUpdateCommand(Verb):
   @property
   def name(self):
@@ -126,7 +126,8 @@ class CreateJobCommand(Verb):
       raise context.CommandError(EXIT_INVALID_PARAMETER, "Job not found")
     elif resp.responseCode == ResponseCode.ERROR:
       context.print_err("job create failed because of scheduler error")
-      raise context.CommandError(EXIT_COMMAND_FAILURE, "Error reported by scheduler; see
log for details")
+      raise context.CommandError(EXIT_COMMAND_FAILURE,
+          "Error reported by scheduler; see log for details")
     if context.options.open_browser:
       context.open_job_page(api, config)
     if context.options.wait_until == "RUNNING":
@@ -625,6 +626,7 @@ class StatusCommand(Verb):
     else:
       return EXIT_INVALID_PARAMETER
 
+
 class UpdateCommand(Verb):
   @property
   def name(self):
@@ -695,7 +697,6 @@ class UpdateCommand(Verb):
     return EXIT_OK
 
 
-
 class Job(Noun):
   @property
   def name(self):

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/client/cli/standalone_client.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/standalone_client.py b/src/main/python/apache/aurora/client/cli/standalone_client.py
index fd2232b..7c0975c 100644
--- a/src/main/python/apache/aurora/client/cli/standalone_client.py
+++ b/src/main/python/apache/aurora/client/cli/standalone_client.py
@@ -98,7 +98,6 @@ class AuroraCommandLine(CommandLine):
     self.register_plugin(AuroraLogConfigurationPlugin())
     self.register_plugin(AuroraErrorHandlingPlugin())
 
-
   @classmethod
   def get_description(cls):
     return 'Aurora client command line'

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/client/cli/task.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/task.py b/src/main/python/apache/aurora/client/cli/task.py
index 492dec1..c41484b 100644
--- a/src/main/python/apache/aurora/client/cli/task.py
+++ b/src/main/python/apache/aurora/client/cli/task.py
@@ -23,16 +23,7 @@ from apache.aurora.client.api.command_runner import (
     DistributedCommandRunner,
     InstanceDistributedCommandRunner
 )
-from apache.aurora.client.api.updater_util import UpdaterConfig
-from apache.aurora.client.cli import (
-    EXIT_COMMAND_FAILURE,
-    EXIT_INVALID_CONFIGURATION,
-    EXIT_INVALID_PARAMETER,
-    EXIT_OK,
-    Noun,
-    print_aurora_log,
-    Verb
-)
+from apache.aurora.client.cli import EXIT_INVALID_PARAMETER, Noun, print_aurora_log, Verb
 from apache.aurora.client.cli.context import AuroraCommandContext
 from apache.aurora.client.cli.options import (
     CommandOption,
@@ -43,8 +34,6 @@ from apache.aurora.client.cli.options import (
 )
 from apache.aurora.common.clusters import CLUSTERS
 
-from gen.apache.aurora.api.ttypes import ResponseCode
-
 
 class RunCommand(Verb):
   @property

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/client/commands/core.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/commands/core.py b/src/main/python/apache/aurora/client/commands/core.py
index 5e6cedf..58f419e 100644
--- a/src/main/python/apache/aurora/client/commands/core.py
+++ b/src/main/python/apache/aurora/client/commands/core.py
@@ -172,6 +172,7 @@ def maybe_disable_hooks(options):
     GlobalHookRegistry.disable_hooks()
     log.info('Client hooks disabled; reason given by user: %s' % options.disable_all_hooks_reason)
 
+
 def v1_deprecation_warning(old, new):
   print("WARNING: %s is an aurora clientv1 command which will be deprecated soon" % old)
   print("To run this command using clientv2, use 'aurora %s'" % " ".join(new))
@@ -225,7 +226,6 @@ def create(job_spec, config_file):
   return really_create(job_spec, config_file, options)
 
 
-
 @app.command
 @app.command_option(ENVIRONMENT_BIND_OPTION)
 @app.command_option(CLUSTER_CONFIG_OPTION)

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/client/commands/maintenance.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/commands/maintenance.py b/src/main/python/apache/aurora/client/commands/maintenance.py
index c83b96a..e465d97 100644
--- a/src/main/python/apache/aurora/client/commands/maintenance.py
+++ b/src/main/python/apache/aurora/client/commands/maintenance.py
@@ -12,8 +12,6 @@
 # limitations under the License.
 #
 
-import logging
-
 from twitter.common import app, log
 
 from apache.aurora.admin.admin_util import (
@@ -29,7 +27,7 @@ from apache.aurora.admin.admin_util import (
     UNSAFE_SLA_HOSTS_FILE_OPTION
 )
 from apache.aurora.admin.host_maintenance import HostMaintenance
-from apache.aurora.client.base import die, get_grouping_or_die, GROUPING_OPTION, requires
+from apache.aurora.client.base import get_grouping_or_die, GROUPING_OPTION, requires
 from apache.aurora.common.clusters import CLUSTERS
 
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/client/commands/run.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/commands/run.py b/src/main/python/apache/aurora/client/commands/run.py
index 7ed22d3..6844ac3 100644
--- a/src/main/python/apache/aurora/client/commands/run.py
+++ b/src/main/python/apache/aurora/client/commands/run.py
@@ -49,8 +49,7 @@ def run(args, options):
   if not args:
     die('job path is required')
   job_path = args.pop(0)
-  new_cmd = ["task", "run" ]
-  instances_spec = job_path
+  new_cmd = ["task", "run"]
   if options.num_threads != 1:
     new_cmd.append("--threads=%s" % options.num_threads)
   if options.ssh_user is not None:

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/client/commands/ssh.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/commands/ssh.py b/src/main/python/apache/aurora/client/commands/ssh.py
index afd5ab7..9ee94a0 100644
--- a/src/main/python/apache/aurora/client/commands/ssh.py
+++ b/src/main/python/apache/aurora/client/commands/ssh.py
@@ -81,7 +81,6 @@ def ssh(args, options):
 
   ssh_command = ['ssh', '-t']
 
-
   role = first_task.assignedTask.task.owner.role
   slave_host = first_task.assignedTask.slaveHost
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/executor/common/health_checker.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/executor/common/health_checker.py b/src/main/python/apache/aurora/executor/common/health_checker.py
index bed9aee..4980411 100644
--- a/src/main/python/apache/aurora/executor/common/health_checker.py
+++ b/src/main/python/apache/aurora/executor/common/health_checker.py
@@ -134,6 +134,7 @@ class HealthChecker(StatusChecker):
   def stop(self):
     self.threaded_health_checker.stop()
 
+
 class HealthCheckerProvider(StatusCheckerProvider):
   def from_assigned_task(self, assigned_task, _):
     mesos_task = mesos_task_instance_from_assigned_task(assigned_task)

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/executor/gc_executor.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/executor/gc_executor.py b/src/main/python/apache/aurora/executor/gc_executor.py
index 44eb0da..80ce6dc 100644
--- a/src/main/python/apache/aurora/executor/gc_executor.py
+++ b/src/main/python/apache/aurora/executor/gc_executor.py
@@ -27,7 +27,6 @@ import time
 import psutil
 from mesos.interface import mesos_pb2
 from thrift.TSerialization import deserialize as thrift_deserialize
-from thrift.TSerialization import serialize as thrift_serialize
 from twitter.common.collections import OrderedDict
 from twitter.common.exceptions import ExceptionalThread
 from twitter.common.metrics import Observable

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/main/python/apache/aurora/tools/java/thrift_wrapper_codegen.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/tools/java/thrift_wrapper_codegen.py b/src/main/python/apache/aurora/tools/java/thrift_wrapper_codegen.py
index c4ca3a2..c0b109f 100644
--- a/src/main/python/apache/aurora/tools/java/thrift_wrapper_codegen.py
+++ b/src/main/python/apache/aurora/tools/java/thrift_wrapper_codegen.py
@@ -12,6 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+# checkstyle: noqa
 from __future__ import print_function
 
 import os
@@ -138,7 +139,6 @@ STRUCT_COLLECTION_FIELD_ASSIGNMENT = '''this.%(field)s = !wrapped.%(isset)s()
 PACKAGE_NAME = 'org.apache.aurora.scheduler.storage.entities'
 
 
-
 CLASS_TEMPLATE = '''package %(package)s;
 
 %(imports)s

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/test/python/apache/aurora/client/api/test_api.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_api.py b/src/test/python/apache/aurora/client/api/test_api.py
index 43370d8..47b5236 100644
--- a/src/test/python/apache/aurora/client/api/test_api.py
+++ b/src/test/python/apache/aurora/client/api/test_api.py
@@ -21,7 +21,6 @@ from apache.aurora.common.cluster import Cluster
 from apache.aurora.config import AuroraConfig
 
 from gen.apache.aurora.api.ttypes import (
-    JobKey,
     JobUpdateQuery,
     JobUpdateRequest,
     JobUpdateSettings,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/test/python/apache/aurora/client/api/test_scheduler_client.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_scheduler_client.py b/src/test/python/apache/aurora/client/api/test_scheduler_client.py
index 1cbfbf8..1835843 100644
--- a/src/test/python/apache/aurora/client/api/test_scheduler_client.py
+++ b/src/test/python/apache/aurora/client/api/test_scheduler_client.py
@@ -19,7 +19,7 @@ import unittest
 import mock
 import pytest
 from mox import IgnoreArg, IsA, Mox
-from thrift.transport import THttpClient, TTransport
+from thrift.transport import TTransport
 from twitter.common.quantity import Amount, Time
 from twitter.common.zookeeper.kazoo_client import TwitterKazooClient
 from twitter.common.zookeeper.serverset.endpoint import ServiceInstance

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/test/python/apache/aurora/client/api/test_updater.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_updater.py b/src/test/python/apache/aurora/client/api/test_updater.py
index e4c9ad0..6905831 100644
--- a/src/test/python/apache/aurora/client/api/test_updater.py
+++ b/src/test/python/apache/aurora/client/api/test_updater.py
@@ -39,7 +39,6 @@ from gen.apache.aurora.api.ttypes import (
     JobConfiguration,
     JobKey,
     LimitConstraint,
-    Lock,
     LockKey,
     LockValidation,
     Metadata,
@@ -131,7 +130,6 @@ class UpdaterTest(TestCase):
     'wait_for_batch_completion': False,
   }
 
-
   def setUp(self):
     self._role = 'mesos'
     self._name = 'jimbob'
@@ -530,7 +528,6 @@ class UpdaterTest(TestCase):
     self.update_and_expect_ok(instances=[2, 3, 4])
     self.verify_mocks()
 
-
   def test_patch_hole_with_instance_option(self):
     """Patching an instance ID gap created by a terminated update."""
     old_configs = self.make_task_configs(8)

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/test/python/apache/aurora/client/cli/test_cron.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_cron.py b/src/test/python/apache/aurora/client/cli/test_cron.py
index 56f0bd4..c7b71c2 100644
--- a/src/test/python/apache/aurora/client/cli/test_cron.py
+++ b/src/test/python/apache/aurora/client/cli/test_cron.py
@@ -19,12 +19,7 @@ import contextlib
 from mock import Mock, patch
 from twitter.common.contextutil import temporary_file
 
-from apache.aurora.client.cli import (
-    EXIT_API_ERROR,
-    EXIT_COMMAND_FAILURE,
-    EXIT_INVALID_CONFIGURATION,
-    EXIT_OK
-)
+from apache.aurora.client.cli import EXIT_API_ERROR, EXIT_INVALID_CONFIGURATION, EXIT_OK
 from apache.aurora.client.cli.client import AuroraCommandLine
 from apache.aurora.client.cli.util import AuroraClientCommandTest, FakeAuroraCommandContext
 from apache.aurora.config import AuroraConfig

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/test/python/apache/aurora/client/cli/test_update.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_update.py b/src/test/python/apache/aurora/client/cli/test_update.py
index eeed774..85b1db1 100644
--- a/src/test/python/apache/aurora/client/cli/test_update.py
+++ b/src/test/python/apache/aurora/client/cli/test_update.py
@@ -51,7 +51,6 @@ class TestUpdateCommand(AuroraClientCommandTest):
     def terminate(self):
       pass
 
-
   # First, we pretend that the updater isn't really client-side, and test
   # that the client makes the right API call to the updated.
   def test_update_command_line_succeeds(self):

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/test/python/apache/aurora/client/commands/test_admin.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_admin.py b/src/test/python/apache/aurora/client/commands/test_admin.py
index f2bf7b5..1192556 100644
--- a/src/test/python/apache/aurora/client/commands/test_admin.py
+++ b/src/test/python/apache/aurora/client/commands/test_admin.py
@@ -27,7 +27,6 @@ from apache.aurora.client.commands.admin import (
 )
 from apache.aurora.client.commands.util import AuroraClientCommandTest
 
-from gen.apache.aurora.api.constants import ACTIVE_STATES, TERMINAL_STATES
 from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     GetLocksResult,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/test/python/apache/aurora/client/commands/test_kill.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_kill.py b/src/test/python/apache/aurora/client/commands/test_kill.py
index 3e6d048..c0a6fd4 100644
--- a/src/test/python/apache/aurora/client/commands/test_kill.py
+++ b/src/test/python/apache/aurora/client/commands/test_kill.py
@@ -199,7 +199,6 @@ class TestClientKillCommand(AuroraClientCommandTest):
 
     CoreCommandHook.register_hook(HappyHook())
 
-
     mock_options = self.setup_mock_options()
     mock_config = Mock()
     (mock_api, mock_scheduler_proxy) = self.create_mock_api()
@@ -235,8 +234,6 @@ class TestClientKillCommand(AuroraClientCommandTest):
       self.assert_scheduler_called(mock_api, self.get_expected_task_query(), 3)
       CoreCommandHook.clear_hooks()
 
-
-
   def test_hook_aborts_kill(self):
     """Test that a command hook that returns non-zero does block command execution."""
     class FailingKillHook(CoreCommandHook):
@@ -270,13 +267,12 @@ class TestClientKillCommand(AuroraClientCommandTest):
       with temporary_file() as fp:
         fp.write(self.get_valid_config())
         fp.flush()
-        self.assertRaises(SystemExit, killall, ['west/mchucarroll/test/hello', fp.name],
mock_options)
+        self.assertRaises(
+            SystemExit, killall, ['west/mchucarroll/test/hello', fp.name], mock_options)
 
       CoreCommandHook.clear_hooks()
       mock_api.kill_job.call_count == 0
 
-
-
   def create_status_call_result(cls):
     """Set up the mock status call that will be used to get a task list for
     a batched kill command.

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/test/python/apache/aurora/client/commands/test_maintenance.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_maintenance.py b/src/test/python/apache/aurora/client/commands/test_maintenance.py
index 004033b..d86aaf6 100644
--- a/src/test/python/apache/aurora/client/commands/test_maintenance.py
+++ b/src/test/python/apache/aurora/client/commands/test_maintenance.py
@@ -305,7 +305,6 @@ class TestMaintenanceCommands(AuroraClientCommandTest):
         patch('twitter.common.app.get_options', return_value=mock_options)):
       self.assertRaises(SystemExit, host_drain, [self.TEST_CLUSTER])
 
-
   def test_host_maintenance_status(self):
     mock_options = self.make_mock_options()
     mock_api, mock_scheduler_proxy = self.create_mock_api()

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ee4e428c/src/test/python/apache/aurora/executor/test_gc_executor.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/executor/test_gc_executor.py b/src/test/python/apache/aurora/executor/test_gc_executor.py
index 774c9ba..d90dc68 100644
--- a/src/test/python/apache/aurora/executor/test_gc_executor.py
+++ b/src/test/python/apache/aurora/executor/test_gc_executor.py
@@ -24,7 +24,6 @@ from itertools import product
 
 import mock
 from mesos.interface import mesos_pb2
-from thrift.TSerialization import deserialize as thrift_deserialize
 from thrift.TSerialization import serialize as thrift_serialize
 from twitter.common.concurrent import deadline, Timeout
 from twitter.common.contextutil import temporary_dir


Mime
View raw message