Skip to content

Commit

Permalink
Merge pull request #217 from dhermes/add-tox-lint
Browse files Browse the repository at this point in the history
Adding PEP8 only lint rule to tox and Travis.
  • Loading branch information
tseaver committed Oct 7, 2014
2 parents e30de64 + 4d18786 commit c7b36f8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ script:
- tox -e py27
after_success:
- tox -e cover
- tox -e lint
- coveralls
5 changes: 3 additions & 2 deletions gcloud/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
14 changes: 13 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py26,py27,cover,docs
py26,py27,cover,docs,lint

[testenv]
commands =
Expand Down Expand Up @@ -28,3 +28,15 @@ 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,*.egg/,.*/
verbose = 1

[testenv:lint]
basepython =
python2.7
commands =
pep8
deps =
pep8

0 comments on commit c7b36f8

Please sign in to comment.