Skip to content

Commit

Permalink
Run ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
treyhunner committed Jan 13, 2024
1 parent 9059d25 commit d9ff268
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 6 additions & 1 deletion relatives/tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ class Sailor(models.Model):
"""Sailors have an admin URL and sometimes link to ships"""

name = models.CharField(max_length=80)
ship = models.ForeignKey(Ship, null=True, on_delete=models.SET_NULL, verbose_name="sea ship")
ship = models.ForeignKey(
Ship,
null=True,
on_delete=models.SET_NULL,
verbose_name="sea ship",
)

@property
def ship_name(self):
Expand Down
3 changes: 1 addition & 2 deletions relatives/tests/tests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import unicode_literals
from django.test import TestCase
from django.template.loader import render_to_string
from django.urls import reverse
Expand Down Expand Up @@ -260,4 +259,4 @@ def test_verbose_name_used_in_change_list(self):
ship = Ship.objects.create(id=1, name="Star of India")
Sailor.objects.create(name="John Ford", ship=ship)
response = self.client.get(reverse("admin:tests_sailor_changelist"))
self.assertIn(b'sea ship', response.content) # verbose_name used
self.assertIn(b"sea ship", response.content) # verbose_name used

0 comments on commit d9ff268

Please sign in to comment.