From a92da8455ea487e63f443d6ff1d0d39b7b1a3db2 Mon Sep 17 00:00:00 2001 From: Todd Dembrey <todd.dembrey@torchbox.com> Date: Thu, 21 Jun 2018 21:18:32 +0100 Subject: [PATCH] Linting --- opentech/apply/funds/forms.py | 1 - opentech/apply/funds/models.py | 2 -- opentech/apply/funds/tests/factories/models.py | 2 +- opentech/apply/funds/views.py | 4 ---- 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/opentech/apply/funds/forms.py b/opentech/apply/funds/forms.py index e9c62fba4..c5efce9d4 100644 --- a/opentech/apply/funds/forms.py +++ b/opentech/apply/funds/forms.py @@ -1,5 +1,4 @@ from django import forms -from django_fsm import can_proceed from opentech.apply.users.models import User diff --git a/opentech/apply/funds/models.py b/opentech/apply/funds/models.py index a43e4141e..35024c38f 100644 --- a/opentech/apply/funds/models.py +++ b/opentech/apply/funds/models.py @@ -1,5 +1,4 @@ from datetime import date -import copy import os from django.conf import settings @@ -789,7 +788,6 @@ class ApplicationSubmission(WorkflowHelpers, BaseStreamForm, AbstractFormSubmiss if isinstance(field.block, MustIncludeFieldBlock) } - def process_form_data(self): for field_name, field_id in self.must_include.items(): response = self.form_data.pop(field_id, None) diff --git a/opentech/apply/funds/tests/factories/models.py b/opentech/apply/funds/tests/factories/models.py index ed198f6c0..183fb45fd 100644 --- a/opentech/apply/funds/tests/factories/models.py +++ b/opentech/apply/funds/tests/factories/models.py @@ -184,7 +184,7 @@ class FormDataFactory(factory.Factory, metaclass=Metaclass): for field in form_fields } else: - form_definition = { + form_definition = { f.block_type: f.id for f in form_fields or ApplicationSubmission.form_fields.field.to_python(form_fields) } diff --git a/opentech/apply/funds/views.py b/opentech/apply/funds/views.py index 42a9561a9..8eb11313f 100644 --- a/opentech/apply/funds/views.py +++ b/opentech/apply/funds/views.py @@ -8,7 +8,6 @@ from django.utils.text import mark_safe from django.views.generic import DetailView, ListView, UpdateView from django_filters.views import FilterView -from django_fsm import can_proceed from django_tables2.views import SingleTableMixin from opentech.apply.activity.views import ( @@ -22,9 +21,7 @@ from opentech.apply.funds.workflow import DETERMINATION_RESPONSE_TRANSITIONS from opentech.apply.review.views import ReviewContextMixin from opentech.apply.users.decorators import staff_required from opentech.apply.utils.views import DelegateableView, ViewDispatcher -from opentech.apply.users.models import User -from .blocks import MustIncludeFieldBlock from .differ import compare from .forms import ProgressSubmissionForm, UpdateReviewersForm, UpdateSubmissionLeadForm from .models import ApplicationSubmission, ApplicationRevision @@ -253,7 +250,6 @@ class RevisionListView(ListView): self.queryset = self.model.objects.filter(submission=self.submission).exclude(id=self.submission.draft_revision.id) return super().get_queryset() - def get_context_data(self, **kwargs): return super().get_context_data( submission=self.submission, -- GitLab