[format] Blacken some stuff
All checks were successful
build & deploy / test (push) Successful in 1m39s
build & deploy / deploy (push) Successful in 21s

This commit is contained in:
2026-03-17 13:26:54 -04:00
parent 653aabfbb1
commit a8dc336950
2 changed files with 12 additions and 6 deletions

View File

@ -63,7 +63,9 @@ class KoReaderImportSerializer(serializers.HyperlinkedModelSerializer):
fields = "__all__" fields = "__all__"
class AudioScrobblerTSVImportSerializer(serializers.HyperlinkedModelSerializer): class AudioScrobblerTSVImportSerializer(
serializers.HyperlinkedModelSerializer
):
class Meta: class Meta:
model = AudioScrobblerTSVImport model = AudioScrobblerTSVImport
fields = "__all__" fields = "__all__"

View File

@ -39,9 +39,9 @@ class Domain(TimeStampedModel):
def scrobbles_for_user(self, user_id): def scrobbles_for_user(self, user_id):
from scrobbles.models import Scrobble from scrobbles.models import Scrobble
return Scrobble.objects.filter(web_page__domain=self, user_id=user_id).order_by( return Scrobble.objects.filter(
"-timestamp" web_page__domain=self, user_id=user_id
) ).order_by("-timestamp")
class WebPage(ScrobblableMixin): class WebPage(ScrobblableMixin):
@ -136,7 +136,9 @@ class WebPage(ScrobblableMixin):
def scrobbles(self, user): def scrobbles(self, user):
Scrobble = apps.get_model("scrobbles", "Scrobble") Scrobble = apps.get_model("scrobbles", "Scrobble")
return Scrobble.objects.filter(user=user, web_page=self).order_by("-timestamp") return Scrobble.objects.filter(user=user, web_page=self).order_by(
"-timestamp"
)
def clean_title(self, title: str, save=True): def clean_title(self, title: str, save=True):
if len(title.split("|")) > 1: if len(title.split("|")) > 1:
@ -211,7 +213,9 @@ class WebPage(ScrobblableMixin):
return return
if response.status_code == 200: if response.status_code == 200:
logger.info("Website already exists in archive", extra={"url": self.url}) logger.info(
"Website already exists in archive", extra={"url": self.url}
)
else: else:
raise Exception( raise Exception(
f"Failed to push URL to archivebox (Response {response.status_code})" f"Failed to push URL to archivebox (Response {response.status_code})"