From 45e1dcbba2a372179797043eaea51d2c6b3085af Mon Sep 17 00:00:00 2001 From: Neil Martinsen-Burrell Date: Wed, 23 Nov 2022 13:56:59 -0600 Subject: [PATCH] Fix linting errors --- src/registrar/forms/application_wizard.py | 8 +++++--- src/registrar/tests/test_views.py | 5 +---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 311981042..9e3cb304c 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -4,6 +4,8 @@ from __future__ import annotations # allows forward references in annotations import logging +from typing import Union + from django import forms from django.shortcuts import render @@ -72,7 +74,7 @@ class OrganizationElectionForm(RegistrarForm): (False, "No"), ], ), - required=False + required=False, ) @@ -298,12 +300,12 @@ def _get_organization_type(wizard: ApplicationWizard) -> Union[str, None]: return None -def show_organization_federal(wizard: ApplicationWizard) -> Bool: +def show_organization_federal(wizard: ApplicationWizard) -> bool: """Show this step if the answer to the first question was "federal".""" return _get_organization_type(wizard) == "Federal" -def show_organization_election(wizard: ApplicationWizard) -> Bool: +def show_organization_election(wizard: ApplicationWizard) -> bool: """Show this step if the answer to the first question implies it. This shows for answers that aren't "Federal" or "Interstate". diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py index 374336d4a..96128b389 100644 --- a/src/registrar/tests/test_views.py +++ b/src/registrar/tests/test_views.py @@ -134,7 +134,6 @@ class FormTests(TestWithUser, WebTest): self.assertEquals(type_result.status_code, 302) self.assertEquals(type_result["Location"], "/register/organization_federal/") - # ---- FEDERAL BRANCH PAGE ---- # Follow the redirect to the next form page self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id) @@ -147,9 +146,7 @@ class FormTests(TestWithUser, WebTest): federal_result = federal_form.submit() self.assertEquals(federal_result.status_code, 302) - self.assertEquals( - federal_result["Location"], "/register/organization_contact/" - ) + self.assertEquals(federal_result["Location"], "/register/organization_contact/") # ---- ORG CONTACT PAGE ---- # Follow the redirect to the next form page