From 06ecbfeba29562dd1170c1be405eedfe1d144a9b Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 4 May 2016 15:58:17 -0400 Subject: [PATCH] Flake8 cleanups. --- mayan/apps/statistics/apps.py | 4 +++- mayan/apps/statistics/classes.py | 4 +++- mayan/apps/statistics/tests/test_views.py | 2 -- mayan/apps/statistics/views.py | 8 ++++---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/mayan/apps/statistics/apps.py b/mayan/apps/statistics/apps.py index 6cd62a7e95..0f182b9b80 100644 --- a/mayan/apps/statistics/apps.py +++ b/mayan/apps/statistics/apps.py @@ -61,7 +61,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI } ) - menu_object.bind_links(links=(link_execute, link_view), sources=(Statistic,)) + menu_object.bind_links( + links=(link_execute, link_view), sources=(Statistic,) + ) menu_object.bind_links( links=(link_namespace_details,), sources=(StatisticNamespace,) ) diff --git a/mayan/apps/statistics/classes.py b/mayan/apps/statistics/classes.py index 7943e0f6c0..5bfc55a43d 100644 --- a/mayan/apps/statistics/classes.py +++ b/mayan/apps/statistics/classes.py @@ -116,7 +116,9 @@ class Statistic(object): StatisticResult.objects.filter(slug=self.slug).delete() - statistic_result, created = StatisticResult.objects.get_or_create(slug=self.slug) + statistic_result, created = StatisticResult.objects.get_or_create( + slug=self.slug + ) statistic_result.store_data(data=results) def get_results(self): diff --git a/mayan/apps/statistics/tests/test_views.py b/mayan/apps/statistics/tests/test_views.py index f8b200909d..133a85d5af 100644 --- a/mayan/apps/statistics/tests/test_views.py +++ b/mayan/apps/statistics/tests/test_views.py @@ -1,7 +1,5 @@ from __future__ import unicode_literals -from django.contrib.auth import get_user_model - from common.tests.test_views import GenericViewTestCase from user_management.tests.literals import ( diff --git a/mayan/apps/statistics/views.py b/mayan/apps/statistics/views.py index 15a8f541cc..6746d0ef75 100644 --- a/mayan/apps/statistics/views.py +++ b/mayan/apps/statistics/views.py @@ -4,9 +4,7 @@ from django.core.urlresolvers import reverse from django.http import Http404 from django.utils.translation import ugettext_lazy as _ -from common.generics import ( - ConfirmView, SimpleView, SingleObjectDetailView, SingleObjectListView -) +from common.generics import ConfirmView, SimpleView, SingleObjectListView from .classes import Statistic, StatisticNamespace from .permissions import permission_statistics_view @@ -75,7 +73,9 @@ class StatisticQueueView(ConfirmView): # Translators: This text is asking users if they want to queue # (to send to the queue) a statistic for it to be update ahead # of schedule - 'title': _('Queue statistic "%s" to be updated?') % self.get_object(), + 'title': _( + 'Queue statistic "%s" to be updated?' + ) % self.get_object(), } def get_object(self):