From bd942fe12e3b7f7dc1eba25ac0f0a38ac115ba62 Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 1 Aug 2023 10:38:58 +0300 Subject: [PATCH] remove useless tabs --- files/__main__.py | 2 +- files/classes/badges.py | 2 +- files/classes/comment.py | 2 +- files/classes/orgy.py | 2 +- files/classes/user.py | 2 +- files/helpers/actions.py | 2 +- files/helpers/sanitize.py | 2 +- files/routes/comments.py | 2 +- files/routes/settings.py | 2 +- files/templates/post_banned.html | 2 +- files/templates/settings/personal.html | 12 ++++++------ 11 files changed, 16 insertions(+), 16 deletions(-) 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 @@ - +
{% with comments=p.replies %} {% include "comments.html" %} diff --git a/files/templates/settings/personal.html b/files/templates/settings/personal.html index 69b3e0eb6..319a57c00 100644 --- a/files/templates/settings/personal.html +++ b/files/templates/settings/personal.html @@ -201,9 +201,9 @@ {% if FEATURES['PRONOUNS'] %} {{common.line_text_section('pronouns', '/settings/pronouns_change', 'pronouns', 'Pronouns', v.pronouns, 'Limit of 15 characters', 'Enter pronouns here', 'Change Pronouns', false, 3, 15, '([a-zA-Z]{1,7})/[a-zA-Z]{1,7}(/[a-zA-Z]{1,7})?', false)}} {% endif %} - + {{common.line_text_section('flair', '/settings/title_change', 'title', 'Flair', v.customtitleplain, 'Limit of 100 characters', 'Enter a flair here', 'Change Flair', true, 0, 100, '.*', v.flairchanged)}} - + {{common.color_section('flaircolor', '/settings/titlecolor', 'titlecolor', 'Flair Color', v.titlecolor)}} {% if FEATURES['USERS_PROFILE_SONG'] -%} @@ -239,11 +239,11 @@ {% if FEATURES['USERS_PROFILE_BODYTEXT'] %} {{common.text_area_section('profile-bio', '/settings/personal', 'bio', 'Bio', v.bio, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Tell the community a bit about yourself.', true, true, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}} {% endif %} - + {{common.text_area_section('profile-friends', '/settings/personal', 'friends', 'Friends', v.friends, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your friends on the site...', false, false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}} - + {{common.text_area_section('profile-enemies', '/settings/personal', 'enemies', 'Enemies', v.enemies, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your enemies on the site...', false, false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}} - + {{common.text_area_section('profile-signature', '/settings/personal', 'sig', 'Signature', v.sig, 'Limit of 200 characters', 'Enter a signature...', true, false, 200)}} {{common.toggle_section('Private Mode', 'privateswitch', 'private', v.is_private, 'This will hide your profile page from others.', false)}} @@ -256,7 +256,7 @@
Checkmark Customization
{{common.color_section('verifiedcolor', '/settings/verifiedcolor', 'verifiedcolor', 'Checkmark Color', v.verifiedcolor)}} - + {{common.line_text_section('checkmark_text', '/settings/checkmark_text', 'checkmark-text', 'Checkmark Hover Text', v.verified, 'Limit of 100 characters', 'Enter checkmark hover text here', 'Change Text', false, 0, 100, '.*', false)}}