Fix flake8 complaints

Move flake8 configuration into tox config file
This commit is contained in:
Peter Bittner 2016-04-10 20:05:49 +02:00
parent dadb8f1ff6
commit a0b92e38c8
4 changed files with 10 additions and 9 deletions

View file

@ -1,4 +0,0 @@
[flake8]
max-line-length = 120
max-complexity = 10
exclude = build,dist,docs/conf.py,*/migrations,*.egg-info

View file

@ -1,5 +1,4 @@
from django.conf import settings from django.conf import settings
from django.contrib.auth.models import User
STAFF_ONLY = getattr(settings, 'TODO_STAFF_ONLY', False) STAFF_ONLY = getattr(settings, 'TODO_STAFF_ONLY', False)

View file

@ -389,7 +389,7 @@ def search(request):
query_string = None query_string = None
found_items = None found_items = None
return render(request, return render(request, 'todo/search_results.html', {
'todo/search_results.html', 'query_string': query_string,
{'query_string': query_string, 'found_items': found_items}, 'found_items': found_items
context_instance=RequestContext(request)) }, context_instance=RequestContext(request))

View file

@ -16,3 +16,9 @@ commands = flake8 .
basepython = python3.4 basepython = python3.4
deps = flake8 deps = flake8
commands = flake8 . commands = flake8 .
[flake8]
# TODO: reduce max-complexity, ideally to 10
max-line-length = 120
max-complexity = 21
exclude = build,dist,docs/conf.py,*/migrations,*.egg-info