From 9c800e1f1d5a1a3b645438d17ea35754d923e39e Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:23:49 -0600 Subject: [PATCH] Linting cleanup --- src/registrar/models/user.py | 2 +- src/registrar/templatetags/custom_filters.py | 2 +- src/registrar/tests/test_views_domain.py | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/registrar/models/user.py b/src/registrar/models/user.py index 451a52213..e3e59409a 100644 --- a/src/registrar/models/user.py +++ b/src/registrar/models/user.py @@ -273,7 +273,7 @@ class User(AbstractUser): # Field specific permission checks def has_view_suborganization(self): return self._has_portfolio_permission(UserPortfolioPermissionChoices.VIEW_SUBORGANIZATION) - + def has_edit_suborganization(self): return self._has_portfolio_permission(UserPortfolioPermissionChoices.EDIT_SUBORGANIZATION) diff --git a/src/registrar/templatetags/custom_filters.py b/src/registrar/templatetags/custom_filters.py index 7ad63bd15..e90b3b17f 100644 --- a/src/registrar/templatetags/custom_filters.py +++ b/src/registrar/templatetags/custom_filters.py @@ -152,7 +152,7 @@ def in_path(url, path): return url in path -@register.filter(name='and') +@register.filter(name="and") def and_filter(value, arg): """ Implements logical AND operation in templates. diff --git a/src/registrar/tests/test_views_domain.py b/src/registrar/tests/test_views_domain.py index 1ec1f004a..d6fe95371 100644 --- a/src/registrar/tests/test_views_domain.py +++ b/src/registrar/tests/test_views_domain.py @@ -1643,7 +1643,7 @@ class TestDomainSuborganization(TestDomainOverview): # Create a portfolio and two suborgs portfolio = Portfolio.objects.create(creator=self.user, organization_name="Ice Cream") suborg = Suborganization.objects.create(portfolio=portfolio, name="Vanilla") - suborg_2 = Suborganization.objects.create(portfolio=portfolio, name="Chocolate") + Suborganization.objects.create(portfolio=portfolio, name="Chocolate") # Create an unrelated portfolio unrelated_portfolio = Portfolio.objects.create(creator=self.user, organization_name="Fruit") @@ -1676,8 +1676,7 @@ class TestDomainSuborganization(TestDomainOverview): self.assertNotContains(page, "Save") self.assertContains( - page, - "The suborganization for this domain can only be updated by a organization administrator." + page, "The suborganization for this domain can only be updated by a organization administrator." ) @less_console_noise_decorator