From 23acc006d4c663549d3f8052a64b9a2dbd086b88 Mon Sep 17 00:00:00 2001 From: Christopher Charbonneau Wells Date: Tue, 22 Aug 2017 13:36:49 -0400 Subject: [PATCH] Linting fixes. --- api/tests.py | 3 --- babyblotter/management/commands/fake.py | 2 -- core/templatetags/timers.py | 2 -- core/tests.py | 3 --- core/urls.py | 11 ++++++----- dashboard/templatetags/dashboard.py | 8 ++++++-- dashboard/tests.py | 3 --- gulpfile.js/tasks/lint.js | 2 +- reports/tests.py | 3 --- 9 files changed, 13 insertions(+), 24 deletions(-) delete mode 100644 api/tests.py delete mode 100644 core/tests.py delete mode 100644 dashboard/tests.py delete mode 100644 reports/tests.py diff --git a/api/tests.py b/api/tests.py deleted file mode 100644 index 7ce503c2..00000000 --- a/api/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/babyblotter/management/commands/fake.py b/babyblotter/management/commands/fake.py index 21eab5c9..cf88e42e 100644 --- a/babyblotter/management/commands/fake.py +++ b/babyblotter/management/commands/fake.py @@ -133,5 +133,3 @@ class Command(BaseCommand): milestone=milestone ).save() start = end - - diff --git a/core/templatetags/timers.py b/core/templatetags/timers.py index 7b6a2533..f3d6f196 100644 --- a/core/templatetags/timers.py +++ b/core/templatetags/timers.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from datetime import timedelta - from django import template from core.models import Timer diff --git a/core/tests.py b/core/tests.py deleted file mode 100644 index 7ce503c2..00000000 --- a/core/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/core/urls.py b/core/urls.py index fd0dd1cd..b6651693 100644 --- a/core/urls.py +++ b/core/urls.py @@ -23,8 +23,8 @@ urlpatterns = [ name='diaperchange-add'), url(r'^changes/(?P[0-9]+)/$', views.DiaperChangeUpdate.as_view(), name='diaperchange-update'), - url(r'^changes/(?P[0-9]+)/delete/$', views.DiaperChangeDelete.as_view(), - name='diaperchange-delete'), + url(r'^changes/(?P[0-9]+)/delete/$', + views.DiaperChangeDelete.as_view(), name='diaperchange-delete'), url(r'^feedings/$', views.FeedingList.as_view(), name='feeding-list'), url(r'^feedings/add/$', views.FeedingAdd.as_view(), name='feeding-add'), @@ -55,11 +55,12 @@ urlpatterns = [ url(r'^timer/(?P[0-9]+)/delete/$', views.TimerDelete.as_view(), name='timer-delete'), - url(r'^tummy-time/$', views.TummyTimeList.as_view(), name='tummytime-list'), + url(r'^tummy-time/$', views.TummyTimeList.as_view(), + name='tummytime-list'), url(r'^tummy-time/add/$', views.TummyTimeAdd.as_view(), name='tummytime-add'), url(r'^tummy-time/(?P[0-9]+)/$', views.TummyTimeUpdate.as_view(), name='tummytime-update'), - url(r'^tummy-time/(?P[0-9]+)/delete/$', views.TummyTimeDelete.as_view(), - name='tummytime-delete'), + url(r'^tummy-time/(?P[0-9]+)/delete/$', + views.TummyTimeDelete.as_view(), name='tummytime-delete'), ] diff --git a/dashboard/templatetags/dashboard.py b/dashboard/templatetags/dashboard.py index 6d1f4454..a15e98d2 100644 --- a/dashboard/templatetags/dashboard.py +++ b/dashboard/templatetags/dashboard.py @@ -61,9 +61,13 @@ def card_tummytime_last(child): def card_tummytime_day(child, date=timezone.now().date()): instances = TummyTime.objects.filter( child=child, end__day=date.day).order_by('-end') - stats = {'total': timezone.timedelta(seconds=0), 'count': instances.count()} + stats = { + 'total': timezone.timedelta(seconds=0), + 'count': instances.count() + } for instance in instances: - stats['total'] += timezone.timedelta(seconds=instance.duration_td().seconds) + stats['total'] += timezone.timedelta( + seconds=instance.duration_td().seconds) return {'stats': stats, 'instances': instances, 'last': instances.first()} diff --git a/dashboard/tests.py b/dashboard/tests.py deleted file mode 100644 index 7ce503c2..00000000 --- a/dashboard/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/gulpfile.js/tasks/lint.js b/gulpfile.js/tasks/lint.js index b114a093..f2c28b88 100644 --- a/gulpfile.js/tasks/lint.js +++ b/gulpfile.js/tasks/lint.js @@ -15,7 +15,7 @@ gulp.task('lint:python', function(cb) { [ 'run', 'flake8', - '--exclude=node_modules,migrations' + '--exclude=migrations,manage.py,node_modules,settings' ], { stdio: 'inherit' diff --git a/reports/tests.py b/reports/tests.py deleted file mode 100644 index 7ce503c2..00000000 --- a/reports/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here.