Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds linting of code with pep8 #448

Merged
merged 4 commits into from
Jun 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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])