Skip to content

Commit

Permalink
fix flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrDlouhy committed Oct 5, 2016
1 parent 8013c1e commit 41c8cc5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ before_script:
- pip install -q "$DJANGO_VERSION"
- python manage.py collectmedia --noinput
- ./update.sh no_virtualenv
- flake8
script:
- python -Wall $VIRTUAL_ENV/bin/coverage run manage.py test
- node_modules/karma/bin/karma start karma.conf.js --single-run
after_script:
- coveralls
before_script:
- flake8
addons:
postgresql: "9.3"
matrix:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


def normpath(*args):
os.path.normpath(os.path.abspath(os.path.join(*args)))
return os.path.normpath(os.path.abspath(os.path.join(*args)))
file_name = normpath(__file__, "..", "..", "..", "templates", 'compress_cache_manifest.txt')


Expand Down
2 changes: 1 addition & 1 deletion project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


def normpath(*args):
os.path.normpath(os.path.abspath(os.path.join(*args)))
return os.path.normpath(os.path.abspath(os.path.join(*args)))

PROJECT_DIR = normpath(__file__, "..", "..")

Expand Down
3 changes: 2 additions & 1 deletion project/settings_local_sample.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-

from settings import LOGGING, PROJECT_DIR, normpath
from settings import * # noqa

# Tento soubor překopírujte s názvem settings_local.py a doplňte vaše lokální nastavení
Expand Down Expand Up @@ -33,7 +34,7 @@
# Don't forget to use absolute paths, not relative paths.
# TEMPLATE_DIRS.append(os.path.join(PROJECT_DIR, 'env/lib/python2.6/site-packages/debug_toolbar/templates'))

#INSTALLED_APPS.append('debug_toolbar')
# INSTALLED_APPS.append('debug_toolbar')


# def custom_show_toolbar(request):
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
max-line-length = 180
exclude = env/*,*/migrations/*,*/static/*,*/bow/*
exclude = env/*,*/migrations/*,*/static/*,*/bow/*,node_modules/*
max-complexity = 10
10 changes: 6 additions & 4 deletions wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
# setting points here.
from django.core.wsgi import get_wsgi_application

import project.settings
import newrelic.agent

from project.settings import PROJECT_DIR

import newrelic.agent
from wsgiunproxy import unproxy

newrelic.agent.initialize(os.path.join(PROJECT_DIR, 'newrelic.ini'))

ALLDIRS = [os.path.join(PROJECT_DIR, 'env/lib/python2.6/site-packages'), ]
Expand All @@ -48,9 +50,9 @@
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")

wsgi_application = get_wsgi_application()
from wsgiunproxy import unproxy

@unproxy(trusted_proxies=[ "b''", ])

@unproxy(trusted_proxies=["b''", ])
def application(environ, start_response):
return wsgi_application(environ, start_response)

Expand Down

0 comments on commit 41c8cc5

Please sign in to comment.