[lint] Fix indentation in .py files.
This commit is contained in:
@ -224,7 +224,7 @@ def isbn_10_to_13(isbn_10):
|
||||
# multiply the odd digits by 1 and the even digits by 3 and sum them
|
||||
try:
|
||||
checksum = sum(int(i) for i in converted[::2]) + \
|
||||
sum(int(i) * 3 for i in converted[1::2])
|
||||
sum(int(i) * 3 for i in converted[1::2])
|
||||
except ValueError:
|
||||
return None
|
||||
# add the checksum mod 10 to the end
|
||||
|
@ -46,9 +46,11 @@ def validate_username(value):
|
||||
|
||||
class ActivitypubFieldMixin:
|
||||
''' make a database field serializable '''
|
||||
def __init__(self, *args, \
|
||||
activitypub_field=None, activitypub_wrapper=None,
|
||||
deduplication_field=False, **kwargs):
|
||||
def __init__(
|
||||
self, *args, \
|
||||
activitypub_field=None, activitypub_wrapper=None,
|
||||
deduplication_field=False, **kwargs
|
||||
):
|
||||
self.deduplication_field = deduplication_field
|
||||
if activitypub_wrapper:
|
||||
self.activitypub_wrapper = activitypub_field
|
||||
|
@ -74,8 +74,10 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
|
||||
for mention_user in self.mention_users.all():
|
||||
# avoid double-notifying about this status
|
||||
if not mention_user.local or \
|
||||
(self.reply_parent and \
|
||||
mention_user == self.reply_parent.user):
|
||||
(
|
||||
self.reply_parent and \
|
||||
mention_user == self.reply_parent.user
|
||||
):
|
||||
continue
|
||||
notification_model.objects.create(
|
||||
user=mention_user,
|
||||
|
Reference in New Issue
Block a user