From 714d9a4e4a0caedc975394ced8e1e49d5aa17921 Mon Sep 17 00:00:00 2001
From: Dan Braghis <dan.braghis@torchbox.com>
Date: Tue, 19 Jun 2018 10:11:31 +0100
Subject: [PATCH] Lint

---
 opentech/apply/determinations/forms.py               |  4 ++--
 .../templatetags/determination_tags.py               | 12 ++++++------
 opentech/apply/determinations/views.py               |  2 +-
 opentech/apply/funds/views.py                        |  5 +++--
 4 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/opentech/apply/determinations/forms.py b/opentech/apply/determinations/forms.py
index f33e4fe28..1ef0848bf 100644
--- a/opentech/apply/determinations/forms.py
+++ b/opentech/apply/determinations/forms.py
@@ -68,7 +68,7 @@ class BaseDeterminationForm(forms.ModelForm):
 
         if self.draft_button_name not in self.data:
             action_name = self.request.GET.get('action') or \
-                          self.get_action_name_from_determination(int(cleaned_data['determination']))
+                self.get_action_name_from_determination(int(cleaned_data['determination']))
             if action_name:
                 transition = self.submission.get_transition(action_name)
                 if not can_proceed(transition):
@@ -109,7 +109,7 @@ class BaseDeterminationForm(forms.ModelForm):
 
         # Use get_available_status_transitions()?
         for key, _ in self.submission.phase.transitions.items():
-            if suffix  in key:
+            if suffix in key:
                 action_name = key
                 break
 
diff --git a/opentech/apply/determinations/templatetags/determination_tags.py b/opentech/apply/determinations/templatetags/determination_tags.py
index ecb5e4e1b..812b3eade 100644
--- a/opentech/apply/determinations/templatetags/determination_tags.py
+++ b/opentech/apply/determinations/templatetags/determination_tags.py
@@ -22,14 +22,14 @@ def can_add_determination(user, submission):
     """
     try:
         has_determination_response = submission.determination \
-                                     and not submission.determination.is_draft \
-                                     and submission.determination.determination != UNDETERMINED
+            and not submission.determination.is_draft \
+            and submission.determination.determination != UNDETERMINED
     except ObjectDoesNotExist:
         has_determination_response = False
 
     return submission.user_lead_or_admin(user) \
-           and submission.status in DETERMINATION_PHASES \
-           and not has_determination_response
+        and submission.status in DETERMINATION_PHASES \
+        and not has_determination_response
 
 
 @register.filter
@@ -52,8 +52,8 @@ def pending_determination(submission, user):
     if submission.status in DETERMINATION_PHASES:
         try:
             return not submission.determination \
-                    or (submission.determination.is_draft and not user.is_apply_staff) \
-                    or submission.determination.determination == UNDETERMINED
+                or (submission.determination.is_draft and not user.is_apply_staff) \
+                or submission.determination.determination == UNDETERMINED
         except ObjectDoesNotExist:
             return True
 
diff --git a/opentech/apply/determinations/views.py b/opentech/apply/determinations/views.py
index bc90a50c7..f3ae5bc47 100644
--- a/opentech/apply/determinations/views.py
+++ b/opentech/apply/determinations/views.py
@@ -59,7 +59,7 @@ class DeterminationCreateOrUpdateView(CreateOrUpdateView):
     def get_context_data(self, **kwargs):
         try:
             has_determination_response = self.submission.determination.determination != UNDETERMINED \
-                                         and not self.submission.determination.is_draft
+                and not self.submission.determination.is_draft
         except ObjectDoesNotExist:
             has_determination_response = False
 
diff --git a/opentech/apply/funds/views.py b/opentech/apply/funds/views.py
index bde5c1306..c7c79262f 100644
--- a/opentech/apply/funds/views.py
+++ b/opentech/apply/funds/views.py
@@ -75,8 +75,9 @@ class ProgressSubmissionView(DelegatedViewMixin, UpdateView):
         action = form.cleaned_data.get('action')
         # Defer to the determination form for any of the determination transitions
         if action in DETERMINATION_RESPONSE_TRANSITIONS:
-            return HttpResponseRedirect(reverse_lazy('apply:submissions:determinations:form', args=(form.instance.id,))
-                                        + "?action=" + action)
+            return HttpResponseRedirect(reverse_lazy(
+                'apply:submissions:determinations:form',
+                args=(form.instance.id,)) + "?action=" + action)
 
         response = super().form_valid(form)
         return self.progress_stage(form.instance) or response
-- 
GitLab