From 80cc0cbe9fb01e5960d8077f607b382b08755539 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Fri, 3 Oct 2014 07:58:17 -0700 Subject: [PATCH 1/3] Adding PEP8 only lint rule to tox and Travis. --- .travis.yml | 1 + tox.ini | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 745794152942..e643ecc6171e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,5 @@ script: - tox -e py27 after_success: - tox -e cover + - tox -e lint - coveralls diff --git a/tox.ini b/tox.ini index 3634f0cbd27f..0d35b75e4326 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py26,py27,cover,docs + py26,py27,cover,docs,lint [testenv] commands = @@ -28,3 +28,14 @@ commands = sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html deps = Sphinx + +[pep8] +exclude = gcloud/datastore/datastore_v1_pb2.py,.*/,docs/conf.py + +[testenv:lint] +basepython = + python2.7 +commands = + pep8 +deps = + pep8 From 69cd11aca679bcaa9724b09ede34a8601ed81d3f Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Fri, 3 Oct 2014 10:57:18 -0700 Subject: [PATCH 2/3] Adding verbose flag and fixing PEP8 violation in test. --- gcloud/test_connection.py | 5 +++-- tox.ini | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gcloud/test_connection.py b/gcloud/test_connection.py index 1a9b274e91a5..1ea354b89f93 100644 --- a/gcloud/test_connection.py +++ b/gcloud/test_connection.py @@ -46,6 +46,7 @@ def authorize(self, http): def test_user_agent_format(self): from pkg_resources import get_distribution - expected_ua = 'gcloud-python/{0}'.format(get_distribution('gcloud').version) - conn = self._makeOne() + expected_ua = 'gcloud-python/{0}'.format( + get_distribution('gcloud').version) + conn = self._makeOne() self.assertEqual(conn.USER_AGENT, expected_ua) diff --git a/tox.ini b/tox.ini index 0d35b75e4326..91895e59de52 100644 --- a/tox.ini +++ b/tox.ini @@ -31,6 +31,7 @@ deps = [pep8] exclude = gcloud/datastore/datastore_v1_pb2.py,.*/,docs/conf.py +verbose = 1 [testenv:lint] basepython = From 4d1878624acaa34bb32ca6a5eae4cff39ffd451c Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Mon, 6 Oct 2014 20:11:32 -0700 Subject: [PATCH 3/3] Adding *egg files to pep8/lint blacklist. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 91895e59de52..dad00b1bb22d 100644 --- a/tox.ini +++ b/tox.ini @@ -30,7 +30,7 @@ deps = Sphinx [pep8] -exclude = gcloud/datastore/datastore_v1_pb2.py,.*/,docs/conf.py +exclude = gcloud/datastore/datastore_v1_pb2.py,docs/conf.py,*.egg/,.*/ verbose = 1 [testenv:lint]