You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by ma...@apache.org on 2014/10/08 21:23:12 UTC
git commit: Fixing python style violations.
Repository: incubator-aurora
Updated Branches:
refs/heads/master 9359a3eb7 -> ae1ce6c91
Fixing python style violations.
Reviewed at https://reviews.apache.org/r/26428/
Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/ae1ce6c9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/ae1ce6c9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/ae1ce6c9
Branch: refs/heads/master
Commit: ae1ce6c917bc09956abcab995eaaf28c57c009e2
Parents: 9359a3e
Author: Maxim Khutornenko <ma...@apache.org>
Authored: Wed Oct 8 12:23:03 2014 -0700
Committer: Maxim Khutornenko <ma...@apache.org>
Committed: Wed Oct 8 12:23:03 2014 -0700
----------------------------------------------------------------------
build-support/hooks/pre-commit | 5 +++--
src/main/python/apache/aurora/executor/gc_executor.py | 2 --
src/test/python/apache/aurora/client/api/test_updater.py | 1 -
src/test/python/apache/aurora/client/cli/test_create.py | 2 +-
src/test/python/apache/aurora/client/cli/test_inspect.py | 1 -
src/test/python/apache/aurora/client/cli/test_status.py | 1 -
src/test/python/apache/aurora/client/cli/util.py | 1 -
7 files changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ae1ce6c9/build-support/hooks/pre-commit
----------------------------------------------------------------------
diff --git a/build-support/hooks/pre-commit b/build-support/hooks/pre-commit
index 24646e7..619fa9e 100755
--- a/build-support/hooks/pre-commit
+++ b/build-support/hooks/pre-commit
@@ -20,6 +20,7 @@ if [ $SKIP_AURORA_HOOKS ]; then
fi
HERE=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
+TARGET=$HERE/../../src
echo "Performing Python import order check."
if ! $HERE/../../build-support/python/isort-check >&/dev/null; then
@@ -37,12 +38,12 @@ else
fi
echo "Performing Python checkstyle."
-if ! $HERE/../../build-support/python/checkstyle-check >&/dev/null; then
+if ! $HERE/../../build-support/python/checkstyle-check $TARGET >&/dev/null; then
echo ""
echo ""
echo "** PYTHON CHECKSTYLE FAILED"
echo "*"
- echo "* For more information please run: build-support/python/checkstyle-check"
+ echo "* For more information please run: build-support/python/checkstyle-check $TARGET"
echo "*"
echo "**"
echo ""
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ae1ce6c9/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 a11feb9..9b40ada 100644
--- a/src/main/python/apache/aurora/executor/gc_executor.py
+++ b/src/main/python/apache/aurora/executor/gc_executor.py
@@ -446,7 +446,6 @@ class ThermosGCExecutor(ExecutorBase, ExceptionalThread, Observable):
by the slave, and garbage collect orphaned tasks on the system.
"""
run_start = self._clock.time()
- last_gc_run = self._clock.time()
def should_terminate():
now = self._clock.time()
@@ -457,7 +456,6 @@ class ThermosGCExecutor(ExecutorBase, ExceptionalThread, Observable):
while not should_terminate():
try:
_, (task, retain_tasks, retain_start) = self._gc_task_queue.popitem(0)
- last_gc_run = retain_start
self._run_gc(task, retain_tasks, retain_start)
except KeyError: # no enqueued GC tasks
pass
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ae1ce6c9/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 fc6a057..fe27391 100644
--- a/src/test/python/apache/aurora/client/api/test_updater.py
+++ b/src/test/python/apache/aurora/client/api/test_updater.py
@@ -341,7 +341,6 @@ class UpdaterTest(TestCase):
assert message in resp.details[0].message, (
"Expected %s message not found in: %s" % (message, resp.details[0].message))
-
def test_grow(self):
"""Adds instances to the existing job."""
old_configs = self.make_task_configs(3)
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ae1ce6c9/src/test/python/apache/aurora/client/cli/test_create.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_create.py b/src/test/python/apache/aurora/client/cli/test_create.py
index 88d1b35..d172035 100644
--- a/src/test/python/apache/aurora/client/cli/test_create.py
+++ b/src/test/python/apache/aurora/client/cli/test_create.py
@@ -23,7 +23,6 @@ from apache.aurora.client.cli import (
EXIT_COMMAND_FAILURE,
EXIT_INTERRUPTED,
EXIT_INVALID_CONFIGURATION,
- EXIT_OK,
EXIT_UNKNOWN_ERROR
)
from apache.aurora.client.cli.client import AuroraCommandLine
@@ -44,6 +43,7 @@ from gen.apache.aurora.api.ttypes import (
class UnknownException(Exception):
pass
+
class TestClientCreateCommand(AuroraClientCommandTest):
@classmethod
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ae1ce6c9/src/test/python/apache/aurora/client/cli/test_inspect.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_inspect.py b/src/test/python/apache/aurora/client/cli/test_inspect.py
index b64fbf9..e997b97 100644
--- a/src/test/python/apache/aurora/client/cli/test_inspect.py
+++ b/src/test/python/apache/aurora/client/cli/test_inspect.py
@@ -18,7 +18,6 @@ from mock import Mock, patch
from twitter.common.contextutil import temporary_file
from apache.aurora.client.cli.client import AuroraCommandLine
-from apache.aurora.client.cli.context import AuroraCommandContext
from apache.aurora.client.cli.util import AuroraClientCommandTest
from apache.aurora.config import AuroraConfig
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ae1ce6c9/src/test/python/apache/aurora/client/cli/test_status.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_status.py b/src/test/python/apache/aurora/client/cli/test_status.py
index 38ffdb8..d263712 100644
--- a/src/test/python/apache/aurora/client/cli/test_status.py
+++ b/src/test/python/apache/aurora/client/cli/test_status.py
@@ -372,7 +372,6 @@ class TestJobStatus(AuroraClientCommandTest):
'{"jobspec":"west/bozo/test/hello","error":"No matching jobs found"}']
assert result == EXIT_OK
-
def test_successful_status_json_output_no_metadata(self):
"""Test the status command more deeply: in a request with a fully specified
job, it should end up doing a query using getTasksWithoutConfigs."""
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ae1ce6c9/src/test/python/apache/aurora/client/cli/util.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/util.py b/src/test/python/apache/aurora/client/cli/util.py
index 4e9b636..967b5dc 100644
--- a/src/test/python/apache/aurora/client/cli/util.py
+++ b/src/test/python/apache/aurora/client/cli/util.py
@@ -94,7 +94,6 @@ class FakeAuroraCommandContext(AuroraCommandContext):
"""To fuzz around timezone issues with timestamps, just return fixed strings."""
return "YYYY-MM-DD HH:MM:SS"
-
def add_expected_status_query_result(self, expected_result):
self.task_status.append(expected_result)
# each call adds an expected query result, in order.