Skip to content

Commit

Permalink
Add flake8 testing to tox and travis. (#449)
Browse files Browse the repository at this point in the history
* Add flake8 to tox and travis.

* Fix some flake8 errors.
  • Loading branch information
vytisb authored and auvipy committed Jul 13, 2016
1 parent 86f79c4 commit 616286f
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 7 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ env:
- TOXENV="py27-django1.10"
- TOXENV="py35-django1.10"
- TOXENV="py34-django1.10"
- TOXENV="flake8"

matrix:
fast_finish: true
Expand Down
1 change: 0 additions & 1 deletion djcelery/management/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import celery
import djcelery
import django
import sys

from django.core.management.base import BaseCommand
Expand Down
2 changes: 1 addition & 1 deletion djcelery/picklefield.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
@with_metaclass(models.SubfieldBase, skip_attrs=set([
'db_type',
'get_db_prep_save'
]))
]))
class BaseField(models.Field): # noqa
pass

Expand Down
1 change: 0 additions & 1 deletion djcelery/tests/test_backends/test_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from datetime import timedelta

from billiard.einfo import ExceptionInfo
import django
from django.core.cache.backends.base import InvalidCacheBackendError

from celery import result
Expand Down
6 changes: 3 additions & 3 deletions djcelery/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
r'^%s/done/?$' % task_pattern,
views.is_task_successful,
name='celery-is_task_successful'
),
),
url(
r'^%s/status/?$' % task_pattern,
views.task_status,
name='celery-task_status'
),
),
url(
r'^tasks/?$',
views.registered_tasks,
name='celery-tasks'
),
),
]
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ upload-dir = docs/.build/html
[bdist_rpm]
requires = celery >= 3.1.15
django >= 1.8

[flake8]
exclude = build,.git,djcelery/migrations
ignore = X999
9 changes: 8 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27-django{1.8,1.9,1.10}, py33-django1.8, py{34,35}-django{1.8,1.9,1.10}
envlist = py27-django{1.8,1.9,1.10}, py33-django1.8, py{34,35}-django{1.8,1.9,1.10},flake8

[testenv]
sitepackages = False
Expand All @@ -15,3 +15,10 @@ setenv =
DJANGO_SETTINGS_MODULE=settings
commands =
{posargs:python tests/manage.py test}

[testenv:flake8]
basepython = python2.7
deps =
flake8
commands =
flake8

0 comments on commit 616286f

Please sign in to comment.