diff --git a/src/registrar/admin.py b/src/registrar/admin.py index ed16e25b5..63b57138b 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -4,7 +4,10 @@ from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.contenttypes.models import ContentType from django.http.response import HttpResponseRedirect from django.urls import reverse -from registrar.models.utility.admin_form_order_helper import AdminFormOrderHelper, SortingDict # noqa +from registrar.models.utility.admin_form_order_helper import ( + AdminFormOrderHelper, + SortingDict, +) from . import models logger = logging.getLogger(__name__) diff --git a/src/registrar/models/utility/admin_form_order_helper.py b/src/registrar/models/utility/admin_form_order_helper.py index fe081fc9b..acc26db11 100644 --- a/src/registrar/models/utility/admin_form_order_helper.py +++ b/src/registrar/models/utility/admin_form_order_helper.py @@ -57,7 +57,7 @@ class AdminFormOrderHelper: # Only order if we choose to do so # noqa for the linter... reduces readability otherwise - if _order_by_list is not None and _order_by_list != []: # noqa + if _order_by_list is not None and _order_by_list != []: # noqa form_field.queryset = form_field.queryset.order_by(*_order_by_list) return form_field diff --git a/src/registrar/tests/common.py b/src/registrar/tests/common.py index e23384822..49c4d567f 100644 --- a/src/registrar/tests/common.py +++ b/src/registrar/tests/common.py @@ -10,7 +10,16 @@ from typing import List, Dict from django.conf import settings from django.contrib.auth import get_user_model, login -from registrar.models import Contact, DraftDomain, Website, DomainApplication, DomainInvitation, User, DomainInformation, Domain # noqa +from registrar.models import ( + Contact, + DraftDomain, + Website, + DomainApplication, + DomainInvitation, + User, + DomainInformation, + Domain, +) logger = logging.getLogger(__name__) @@ -115,7 +124,7 @@ class AuditedAdminMockData: as a way to optionally include metadata in the string itself. Can be further expanded on. Came from a bug where different querysets used in testing would effectively be 'anonymized', wherein it would only display a list of types, but not include the variable name. - """ # noqa + """ # noqa # Constants for different domain object types INFORMATION = "information" @@ -207,7 +216,7 @@ class AuditedAdminMockData: In more detail: domain_type specifies what kind of domain object you'd like to create, i.e. domain_application (APPLICATION), or domain_information (INFORMATION). - """ # noqa + """ # noqa common_args = self.get_common_domain_arg_dictionary( item_name, org_type, federal_type, purpose ) diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py index 8f039d9bf..a1c8486e7 100644 --- a/src/registrar/tests/test_admin.py +++ b/src/registrar/tests/test_admin.py @@ -1,9 +1,26 @@ from django.test import TestCase, RequestFactory, Client from django.contrib.admin.sites import AdminSite -# noqa is used on all three of these as the linter doesn't like the length of this line -from registrar.admin import DomainApplicationAdmin, ListHeaderAdmin, MyUserAdmin, AuditedAdmin # noqa -from registrar.models import DomainApplication, DomainInformation, User, Contact, DomainInvitation # noqa -from .common import completed_application, mock_user, create_superuser, create_user, multiple_unalphabetical_domain_objects # noqa + +from registrar.admin import ( + DomainApplicationAdmin, + ListHeaderAdmin, + MyUserAdmin, + AuditedAdmin, +) +from registrar.models import ( + DomainApplication, + DomainInformation, + User, + Contact, + DomainInvitation, +) +from .common import ( + completed_application, + mock_user, + create_superuser, + create_user, + multiple_unalphabetical_domain_objects, +) from django.contrib.auth import get_user_model