[format] Blacken some stuff
This commit is contained in:
@ -63,7 +63,9 @@ class KoReaderImportSerializer(serializers.HyperlinkedModelSerializer):
|
||||
fields = "__all__"
|
||||
|
||||
|
||||
class AudioScrobblerTSVImportSerializer(serializers.HyperlinkedModelSerializer):
|
||||
class AudioScrobblerTSVImportSerializer(
|
||||
serializers.HyperlinkedModelSerializer
|
||||
):
|
||||
class Meta:
|
||||
model = AudioScrobblerTSVImport
|
||||
fields = "__all__"
|
||||
|
||||
@ -39,9 +39,9 @@ class Domain(TimeStampedModel):
|
||||
def scrobbles_for_user(self, user_id):
|
||||
from scrobbles.models import Scrobble
|
||||
|
||||
return Scrobble.objects.filter(web_page__domain=self, user_id=user_id).order_by(
|
||||
"-timestamp"
|
||||
)
|
||||
return Scrobble.objects.filter(
|
||||
web_page__domain=self, user_id=user_id
|
||||
).order_by("-timestamp")
|
||||
|
||||
|
||||
class WebPage(ScrobblableMixin):
|
||||
@ -136,7 +136,9 @@ class WebPage(ScrobblableMixin):
|
||||
|
||||
def scrobbles(self, user):
|
||||
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):
|
||||
if len(title.split("|")) > 1:
|
||||
@ -211,7 +213,9 @@ class WebPage(ScrobblableMixin):
|
||||
return
|
||||
|
||||
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:
|
||||
raise Exception(
|
||||
f"Failed to push URL to archivebox (Response {response.status_code})"
|
||||
|
||||
Reference in New Issue
Block a user