Skip to content

Commit

Permalink
Merge pull request #448 from wireload/travis_lint
Browse files Browse the repository at this point in the history
Adds linting of code with pep8
  • Loading branch information
vpetersson committed Jun 22, 2016
2 parents bf74616 + 9f9f4a1 commit a6f49d3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -15,6 +15,7 @@ before_script:
- cp ansible/roles/screenly/files/screenly.conf ~/.screenly/
- echo -e "[local]\nlocalhost ansible_connection=local" > ansible/localhost
script:
- find . -name \*.py -exec pep8 --ignore=E402,E501,E731 {} +
- nosetests -v -a '!fixme'
- ansible-playbook --syntax-check -i ansible/localhost ansible/site.yml
sudo: false
2 changes: 1 addition & 1 deletion bin/wait.py
Expand Up @@ -13,6 +13,6 @@ def is_routing_up():

for _ in range(1, 30):
if is_routing_up():
break;
break
print('Waiting for to come up...')
time.sleep(1)
2 changes: 1 addition & 1 deletion html_templates.py
@@ -1,5 +1,6 @@
# -*- coding: utf8 -*-


def black_page(filepath):
html = """<html>
<head>
Expand All @@ -20,4 +21,3 @@ def black_page(filepath):
with open(filepath, 'w') as f:
f.write(html)
return filepath

2 changes: 1 addition & 1 deletion lib/db.py
@@ -1,10 +1,10 @@
import sqlite3
from contextlib import contextmanager

import queries

conn = lambda db: sqlite3.connect(db, detect_types=sqlite3.PARSE_DECLTYPES)


@contextmanager
def cursor(connection):
cur = connection.cursor()
Expand Down
1 change: 1 addition & 0 deletions requirements.dev.txt
@@ -1,2 +1,3 @@
nose==1.2.1
mock==1.0.1
pep8==1.7.0
6 changes: 1 addition & 5 deletions tests/server_test.py
Expand Up @@ -92,7 +92,7 @@
url_fail = 'http://doesnotwork.example.com'
url_redir = 'http://example.com'
uri_ = '/home/user/file'
#url_timeout = 'http://...'
# url_timeout = 'http://...'


class Req():
Expand Down Expand Up @@ -217,7 +217,3 @@ def test_set_order_empty(self):
fetched = assets_helper.read(self.conn)

self.assertEquals([0, 0, 0], [asset['play_order'] for asset in fetched])




0 comments on commit a6f49d3

Please sign in to comment.