Skip to content

Commit

Permalink
Add lint test :octocat:
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyguitar committed Aug 20, 2017
1 parent 3c1a149 commit 99b4ba5
Show file tree
Hide file tree
Showing 4 changed files with 10 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,6 +9,7 @@ install:
- pip install -r requirements.txt

script:
- make test
- make clean && make

sudo: false
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
REQUIREMENT = requirements.txt

.PHONY: build
.PHONY: build test
build: html

%:
cd docs && make $@

test:
flake8 app.py
6 changes: 4 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
"""
import os

from flask import Flask, send_from_directory
from flask import Flask, abort, send_from_directory
from flask_sslify import SSLify

DIR = os.path.dirname(os.path.realpath(__file__))
ROOT = os.path.join(DIR, 'docs', '_build', 'html')


def find_key(token):
if token == os.environ.get("ACME_TOKEN"):
return os.environ.get("ACME_KEY")
Expand Down Expand Up @@ -39,7 +40,8 @@ def index_redirection():
@app.route("/.well-known/acme-challenge/<token>")
def acme(token):
key = find_key(token)
if key is None: abort(404)
if key is None:
abort(404)
return key


Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ snowballstemmer==1.2.1
Sphinx==1.6.3
sphinx-rtd-theme==0.2.4
Werkzeug==0.12.2
flake8==3.4.1

0 comments on commit 99b4ba5

Please sign in to comment.