diff --git a/files/__main__.py b/files/__main__.py index 9022cc65d..c3397a288 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -55,7 +55,7 @@ app.config["CACHE_DEFAULT_TIMEOUT"] = 86400 #to allow session cookie to work on videos.watchpeopledie.tv if SITE == 'watchpeopledie.tv': app.config["SESSION_COOKIE_DOMAIN"] = SITE - + def get_CF(): with app.app_context(): x = request.headers.get('CF-Connecting-IP') diff --git a/files/classes/badges.py b/files/classes/badges.py index 85eef8206..80e8f18f9 100644 --- a/files/classes/badges.py +++ b/files/classes/badges.py @@ -56,7 +56,7 @@ class Badge(Base): if self.badge_id == 94 and self.user.progressivestack != 1: return self.user.progressivestack if self.badge_id == 170 and self.user.marsify != 1: return self.user.marsify if self.badge_id == 179 and self.user.spider != 1: return self.user.spider - + if self.badge_id == 95: return self.user.bird if self.badge_id == 96: return self.user.flairchanged if self.badge_id == 97: return self.user.longpost diff --git a/files/classes/comment.py b/files/classes/comment.py index 46dcdc04e..50f2e827d 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -78,7 +78,7 @@ def add_options(self, body, v): sub = self.post.sub else: sub = None - + if sub in {'furry','vampire','racist','femboy','edgy'} and not v.house.lower().startswith(sub): disabled = True option_body += ' disabled ' diff --git a/files/classes/orgy.py b/files/classes/orgy.py index 8097aac0c..78f69748b 100644 --- a/files/classes/orgy.py +++ b/files/classes/orgy.py @@ -33,7 +33,7 @@ class Orgy(Base): return self.type == OrgyTypes.RUMBLE def is_twitch(self): return self.type == OrgyTypes.TWITCH - + def __repr__(self): return f"<{self.__class__.__name__}(id={self.id}, type={self.type}, data={self.data} title={self.title})>" diff --git a/files/classes/user.py b/files/classes/user.py index d820522d1..2268b18da 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -203,7 +203,7 @@ class User(Base): return user_query = g.db.query(User).options(load_only(User.id)).filter_by(id=self.id) - + if currency == 'coins': user_query.update({ User.coins: User.coins + amount }) else: diff --git a/files/helpers/actions.py b/files/helpers/actions.py index 2c0895c71..7ecf2cb82 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -139,7 +139,7 @@ def execute_snappy(post, v): snappy.charge_account('coins', cost) body = f'!{group.name}' - + ping_cost = cost elif body.startswith(':#marseyglow'): award_object = AwardRelationship( diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index e5e5ced59..937850ae7 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -307,7 +307,7 @@ def get_youtube_id_and_t(url): t = split[1] id = id.split('?')[0] - + return (id, t) def handle_youtube_links(url): diff --git a/files/routes/comments.py b/files/routes/comments.py index 819646d10..f4f914b43 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -27,7 +27,7 @@ def _mark_comment_as_read(cid, vid): db = db_session() notif = db.query(Notification).options(load_only(Notification.read)).filter_by(comment_id=cid, user_id=vid, read=False).one_or_none() - + if notif and not notif.read: notif.read = True db.add(notif) diff --git a/files/routes/settings.py b/files/routes/settings.py index 6a6009d2a..8e5bc36de 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -946,7 +946,7 @@ def settings_pronouns_change(v): processed = process_settings_plaintext("pronouns", v.pronouns, 15) if isinstance(processed, tuple): return processed - + pronouns = processed if not pronouns_regex.fullmatch(pronouns): return redirect("/settings/personal?error=The pronouns you entered don't match the required format!") diff --git a/files/templates/post_banned.html b/files/templates/post_banned.html index 100cecf49..ccffa92f0 100644 --- a/files/templates/post_banned.html +++ b/files/templates/post_banned.html @@ -91,7 +91,7 @@ - +
Checkmark Customization