Skip to content

Commit

Permalink
trivial: Prepare for ruff bump
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Finucane <stephen@that.guru>
  • Loading branch information
stephenfin committed Apr 8, 2024
1 parent 2aa4742 commit 0f50a62
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 15 deletions.
1 change: 0 additions & 1 deletion patchwork/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,6 @@ def __str__(self):


class Check(models.Model):

"""Check for a patch.
Checks store the results of any tests executed (or executing) for a
Expand Down
1 change: 0 additions & 1 deletion patchwork/tests/test_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@


class PatchNotificationModelTest(TestCase):

"""Tests for the creation and update of the PatchChangeNotifications."""

def setUp(self):
Expand Down
1 change: 0 additions & 1 deletion patchwork/tests/views/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@


class SubmitterCompletionTest(TestCase):

"""Validate the 'submitter' autocomplete endpoint."""

def test_name_complete(self):
Expand Down
4 changes: 0 additions & 4 deletions patchwork/tests/views/test_bundles.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ def setUp(self):


class BundlePublicModifyTest(BundleTestBase):

"""Ensure that non-owners can't modify bundles"""

def setUp(self):
Expand Down Expand Up @@ -275,7 +274,6 @@ def test_bundle_form_submission(self):


class BundlePrivateViewTest(BundleTestBase):

"""Ensure that non-owners can't view private bundles"""

def setUp(self):
Expand Down Expand Up @@ -306,7 +304,6 @@ def test_private_bundle(self):

@override_settings(ENABLE_REST_API=True)
class BundlePrivateViewMboxTest(BundlePrivateViewTest):

"""Ensure that non-owners can't view private bundle mboxes"""

def setUp(self):
Expand Down Expand Up @@ -704,7 +701,6 @@ def test_add_to_non_empty_bundle(self):


class BundleInitialOrderTest(BundleTestBase):

"""When creating bundles from a patch list, ensure that the patches in the
bundle are ordered by date"""

Expand Down
3 changes: 0 additions & 3 deletions patchwork/tests/views/test_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ def test_valid_hash(self):


class OptoutPreexistingTest(OptoutTest):

"""Test that a duplicated opt-out behaves the same as the initial one"""

def setUp(self):
Expand Down Expand Up @@ -280,7 +279,6 @@ def test_valid_hash(self):


class OptinWithoutOptoutTest(TestCase):

"""Test an opt-in with no existing opt-out."""

def test_opt_in_without_optout(self):
Expand All @@ -294,7 +292,6 @@ def test_opt_in_without_optout(self):


class UserProfileOptoutFormTest(TestCase):

"""Validate presence of correct optin/optout forms."""

form_re_template = (
Expand Down
4 changes: 2 additions & 2 deletions patchwork/tests/views/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ def test_utf8_nbsp_tags(self):
"""Test that UTF-8 NBSP characters are correctly handled."""
patch = create_patch(content='patch text\n')
create_patch_comment(
patch=patch, content='comment\nAcked-by:\u00A0 foo'
patch=patch, content='comment\nAcked-by:\u00a0 foo'
)

mbox = utils.patch_to_mbox(patch)
self.assertIn('\u00A0 foo\n', mbox)
self.assertIn('\u00a0 foo\n', mbox)

def test_multiple_tags(self):
"""Test that the mbox view appends tags correct.
Expand Down
6 changes: 3 additions & 3 deletions patchwork/views/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ def _optinout(request, action):

form = EmailForm(data=request.POST)
if not form.is_valid():
context[
'error'
] = 'There was an error in the form. Please review and re-submit.'
context['error'] = (
'There was an error in the form. Please review and re-submit.'
)
context['form'] = form
return render(request, html_template, context)

Expand Down

0 comments on commit 0f50a62

Please sign in to comment.