Fix flake8 complaints
Move flake8 configuration into tox config file
This commit is contained in:
parent
dadb8f1ff6
commit
a0b92e38c8
4 changed files with 10 additions and 9 deletions
|
@ -1,4 +0,0 @@
|
|||
[flake8]
|
||||
max-line-length = 120
|
||||
max-complexity = 10
|
||||
exclude = build,dist,docs/conf.py,*/migrations,*.egg-info
|
|
@ -1,5 +1,4 @@
|
|||
from django.conf import settings
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
|
||||
STAFF_ONLY = getattr(settings, 'TODO_STAFF_ONLY', False)
|
||||
|
|
|
@ -389,7 +389,7 @@ def search(request):
|
|||
query_string = None
|
||||
found_items = None
|
||||
|
||||
return render(request,
|
||||
'todo/search_results.html',
|
||||
{'query_string': query_string, 'found_items': found_items},
|
||||
context_instance=RequestContext(request))
|
||||
return render(request, 'todo/search_results.html', {
|
||||
'query_string': query_string,
|
||||
'found_items': found_items
|
||||
}, context_instance=RequestContext(request))
|
||||
|
|
6
tox.ini
6
tox.ini
|
@ -16,3 +16,9 @@ commands = flake8 .
|
|||
basepython = python3.4
|
||||
deps = 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue