remove unnecessary f

pull/134/head
Aevann 2023-02-24 04:54:31 +02:00
parent 81561f23ca
commit d2bda15383
8 changed files with 17 additions and 17 deletions

View File

@ -395,7 +395,7 @@ class Comment(Base):
body += f"<strong class='ml-2'>Blackjack! Won {floor(wager * 3/2)} {currency_kind}.</strong>"
if is_insured == "1":
body += f" <em class='text-success'>Insured.</em>"
body += " <em class='text-success'>Insured.</em>"
body += '</span>'
return body

View File

@ -107,7 +107,7 @@ def execute_snappy(post:Submission, v:User):
rev = f"* [unddit.com](https://unddit.com/{rev})\n"
elif post.url.startswith("https://old.reddit.com/u/"):
rev = post.url.replace('https://old.reddit.com/u/', '')
rev = f"* [camas.unddit.com](https://camas.unddit.com/reddit-search/#\u007b\"author\":\"{rev}\",\"resultSize\":100\u007d)\n"
rev = "* [camas.unddit.com](https://camas.unddit.com/reddit-search/#\u007b\"author\":\"{rev}\",\"resultSize\":100\u007d)\n"
else: rev = ''
body += f"Snapshots:\n\n{rev}* [archive.org](https://web.archive.org/{post.url})\n* [ghostarchive.org](https://ghostarchive.org/search?term={quote(post.url)})\n* [archive.ph](https://archive.ph/?url={quote(post.url)}&run=1) (click to archive)\n\n"
@ -139,7 +139,7 @@ def execute_snappy(post:Submission, v:User):
addition += f'* [unddit.com](https://unddit.com/{rev})\n'
if href.startswith('https://old.reddit.com/u/'):
rev = href.replace('https://old.reddit.com/u/', '')
addition += f"* [camas.unddit.com](https://camas.unddit.com/reddit-search/#\u007b\"author\":\"{rev}\",\"resultSize\":100\u007d)\n"
addition += "* [camas.unddit.com](https://camas.unddit.com/reddit-search/#\u007b\"author\":\"{rev}\",\"resultSize\":100\u007d)\n"
addition += f'* [archive.org](https://web.archive.org/{href})\n'
addition += f'* [ghostarchive.org](https://ghostarchive.org/search?term={quote(href)})\n'
addition += f'* [archive.ph](https://archive.ph/?url={quote(href)}&run=1) (click to archive)\n'
@ -265,7 +265,7 @@ def execute_zozbot(c:Comment, level:int, post_target:post_target_type, v):
post_target.comment_count += 3
g.db.add(post_target)
push_notif({v.id}, f'New reply by @zozbot', "zoz", (c2.id,posting_to_submission))
push_notif({v.id}, 'New reply by @zozbot', "zoz", (c2.id,posting_to_submission))
def execute_longpostbot(c:Comment, level:int, body, body_html, post_target:post_target_type, v:User):
if SITE_NAME != 'rDrama': return
@ -309,7 +309,7 @@ def execute_longpostbot(c:Comment, level:int, body, body_html, post_target:post_
post_target.comment_count += 3
g.db.add(post_target)
push_notif({v.id}, f'New reply by @longpostbot', c2.body, (c2.id,posting_to_submission))
push_notif({v.id}, 'New reply by @longpostbot', c2.body, (c2.id,posting_to_submission))
def execute_antispam_submission_check(title, v, url):
now = int(time.time())

View File

@ -593,7 +593,7 @@ AWARDS = {
"spider": {
"kind": "spider",
"title": "Spider!",
"description": f"Summons a spider to terrorize the recipient for 24 hours.",
"description": "Summons a spider to terrorize the recipient for 24 hours.",
"icon": "fas fa-spider",
"color": "text-brown",
"price": 2000,

View File

@ -26,7 +26,7 @@ COMMENT_SPAM_SIMILAR_THRESHOLD = 0.5
COMMENT_SPAM_COUNT_THRESHOLD = 10
DISABLE_DOWNVOTES = False
DESCRIPTION = "rdrama.net caters to drama in all forms such as: Real life, videos, photos, gossip, rumors, news sites, Reddit, and Beyond™. There isn't drama we won't touch, and we want it all!"
EMAIL = f"rdrama@rdrama.net"
EMAIL = "rdrama@rdrama.net"
TELEGRAM_ID = ""
DEFAULT_CONFIG_VALUE = "blahblahblah"
@ -374,7 +374,7 @@ PROFANITIES = {
slur_single_words = "|".join([slur.lower() for slur in SLURS.keys()])
profanity_single_words = "|".join([profanity.lower() for profanity in PROFANITIES.keys()])
LONGPOST_REPLIES = ('Wow, you must be a JP fan.', 'This is one of the worst posts I have EVER seen. Delete it.', "No, don't reply like this, please do another wall of unhinged rant please.", '<h1>😴😴😴</h1>', "Ma'am we've been over this before. You need to stop.", "I've known more coherent downies.", "Your pulitzer's in the mail", "That's great and all, but I asked for my burger without cheese.", 'That degree finally paying off', "That's nice sweaty. Why don't you have a seat in the time out corner with Pizzashill until you calm down, then you can have your Capri Sun.", "All them words won't bring your pa back.", "You had a chance to not be completely worthless, but it looks like you threw it away. At least you're consistent.", 'Some people are able to display their intelligence by going on at length on a subject and never actually saying anything. This ability is most common in trades such as politics, public relations, and law. You have impressed me by being able to best them all, while still coming off as an absolute idiot.', "You can type 10,000 characters and you decided that these were the one's that you wanted.", 'Have you owned the libs yet?', "I don't know what you said, because I've seen another human naked.", 'Impressive. Normally people with such severe developmental disabilities struggle to write much more than a sentence or two. He really has exceded our expectations for the writing portion. Sadly the coherency of his writing, along with his abilities in the social skills and reading portions, are far behind his peers with similar disabilities.', "This is a really long way of saying you don't fuck.", "Sorry ma'am, looks like his delusions have gotten worse. We'll have to admit him.", 'If only you could put that energy into your relationships', 'Posts like this is why I do Heroine.', 'still unemployed then?', 'K', 'look im gunna have 2 ask u 2 keep ur giant dumps in the toilet not in my replys 😷😷😷', "Mommy is soooo proud of you, sweaty. Let's put this sperg out up on the fridge with all your other failures.", "Good job bobby, here's a star", "That was a mistake. You're about to find out the hard way why.", f'You sat down and wrote all this shit. You could have done so many other things with your life. What happened to your life that made you decide writing novels of bullshit here was the best option?', "I don't have enough spoons to read this shit", "All those words won't bring daddy back.", 'OUT!', "Damn, you're really mad over this, but thanks for the effort you put into typing that all out! Sadly I won't read it all.", "Jesse what the fuck are you talking about??", "▼you're fucking bananas if you think I'm reading all that, take my downvote and shut up idiot", "Are you feeling okay bud?", '<img loading="lazy" data-bs-toggle="tooltip" alt=":#marseywoah:" src="/e/marseywoah.webp" b title=":#marseywoah:">', 'At no point in your rambling, incoherent post were you even close to anything that could be considered a rational thought. Everyone on this site is now dumber for having read it. May God have mercy on your soul.', 'https://rdrama.net/videos/1671169024815045.mp4')
LONGPOST_REPLIES = ('Wow, you must be a JP fan.', 'This is one of the worst posts I have EVER seen. Delete it.', "No, don't reply like this, please do another wall of unhinged rant please.", '<h1>😴😴😴</h1>', "Ma'am we've been over this before. You need to stop.", "I've known more coherent downies.", "Your pulitzer's in the mail", "That's great and all, but I asked for my burger without cheese.", 'That degree finally paying off', "That's nice sweaty. Why don't you have a seat in the time out corner with Pizzashill until you calm down, then you can have your Capri Sun.", "All them words won't bring your pa back.", "You had a chance to not be completely worthless, but it looks like you threw it away. At least you're consistent.", 'Some people are able to display their intelligence by going on at length on a subject and never actually saying anything. This ability is most common in trades such as politics, public relations, and law. You have impressed me by being able to best them all, while still coming off as an absolute idiot.', "You can type 10,000 characters and you decided that these were the one's that you wanted.", 'Have you owned the libs yet?', "I don't know what you said, because I've seen another human naked.", 'Impressive. Normally people with such severe developmental disabilities struggle to write much more than a sentence or two. He really has exceded our expectations for the writing portion. Sadly the coherency of his writing, along with his abilities in the social skills and reading portions, are far behind his peers with similar disabilities.', "This is a really long way of saying you don't fuck.", "Sorry ma'am, looks like his delusions have gotten worse. We'll have to admit him.", 'If only you could put that energy into your relationships', 'Posts like this is why I do Heroine.', 'still unemployed then?', 'K', 'look im gunna have 2 ask u 2 keep ur giant dumps in the toilet not in my replys 😷😷😷', "Mommy is soooo proud of you, sweaty. Let's put this sperg out up on the fridge with all your other failures.", "Good job bobby, here's a star", "That was a mistake. You're about to find out the hard way why.", 'You sat down and wrote all this shit. You could have done so many other things with your life. What happened to your life that made you decide writing novels of bullshit here was the best option?', "I don't have enough spoons to read this shit", "All those words won't bring daddy back.", 'OUT!', "Damn, you're really mad over this, but thanks for the effort you put into typing that all out! Sadly I won't read it all.", "Jesse what the fuck are you talking about??", "▼you're fucking bananas if you think I'm reading all that, take my downvote and shut up idiot", "Are you feeling okay bud?", '<img loading="lazy" data-bs-toggle="tooltip" alt=":#marseywoah:" src="/e/marseywoah.webp" b title=":#marseywoah:">', 'At no point in your rambling, incoherent post were you even close to anything that could be considered a rational thought. Everyone on this site is now dumber for having read it. May God have mercy on your soul.', 'https://rdrama.net/videos/1671169024815045.mp4')
AGENDAPOSTER_PHRASE = 'trans lives matter'
@ -795,7 +795,7 @@ if SITE == 'rdrama.net':
POST_RATELIMIT = '1/second;5/hour;10/day'
elif SITE == 'watchpeopledie.tv':
EMAIL = f"wpd@watchpeopledie.tv"
EMAIL = "wpd@watchpeopledie.tv"
TELEGRAM_ID = "wpdtv"
DEFAULT_TIME_FILTER = "day"

View File

@ -59,7 +59,7 @@ def end_lottery_session():
notification_text = f'You won {active_lottery.prize} coins in the lottershe! ' \
+ f'Congratulations!\nYour odds of winning were: {chance_to_win}%'
else:
notification_text = f'You did not win the lottershe. Better luck next time!\n' \
notification_text = 'You did not win the lottershe. Better luck next time!\n' \
+ f'Your odds of winning were: {chance_to_win}%\nWinner: @{winning_user.username} (won {active_lottery.prize} coins)'
send_repeatable_notification(user.id, notification_text)
user.currently_held_lottery_tickets = 0
@ -104,7 +104,7 @@ def lottery_ticket_net_value():
def purchase_lottery_tickets(v, quantity=1):
if quantity < 1:
return False, f"Must purchase one or more lottershe tickets!"
return False, "Must purchase one or more lottershe tickets!"
elif (v.coins < LOTTERY_TICKET_COST * quantity):
return False, f"Lottery tickets cost {LOTTERY_TICKET_COST} coins each!"

View File

@ -11,7 +11,7 @@ from flask import render_template
if SITE == 'rdrama.net':
def send_mail(to_address, subject, html):
url = f"https://deuxrama.net/email"
url = "https://deuxrama.net/email"
data = {"from": EMAIL,
"to": to_address,
"subject": subject,

View File

@ -26,5 +26,5 @@ def badge_grant(user, badge_id, description=None, url=None, notify=True):
if notify:
send_repeatable_notification(user.id,
f"@AutoJanny has given you the following profile badge:\n\n" +
"@AutoJanny has given you the following profile badge:\n\n" +
f"![]({badge.path})\n\n**{badge.name}**\n\n{badge.badge.description}")

View File

@ -315,7 +315,7 @@ def edit_post(pid, v):
if execute_blackjack(v, p, text, 'submission'): break
if len(body_html) > POST_BODY_HTML_LENGTH_LIMIT:
abort(400, f"Submission body_html too long!")
abort(400, "Submission body_html too long!")
p.body_html = body_html
@ -659,7 +659,7 @@ def submit_post(v:User, sub=None):
abort(400, "You can only type marseys!")
if len(body_html) > POST_BODY_HTML_LENGTH_LIMIT:
abort(400, f"Submission body_html too long!")
abort(400, "Submission body_html too long!")
flag_notify = (request.values.get("notify", "on") == "on")
flag_new = request.values.get("new", False, bool) or 'megathread' in title.lower()
@ -983,7 +983,7 @@ def set_new_sort(post_id:int, v:User):
g.db.add(ma)
send_repeatable_notification(post.author_id, f"@{v.username} (a site admin) has changed the the default sorting of comments on [{post.title}](/post/{post.id}) to `new`")
return {"message": f"Changed the the default sorting of comments on this post to 'new'"}
return {"message": "Changed the the default sorting of comments on this post to 'new'"}
@app.delete("/post/<int:post_id>/new")
@ -1005,7 +1005,7 @@ def unset_new_sort(post_id:int, v:User):
g.db.add(ma)
send_repeatable_notification(post.author_id, f"@{v.username} (a site admin) has changed the the default sorting of comments on [{post.title}](/post/{post.id}) to `hot`")
return {"message": f"Changed the the default sorting of comments on this post to 'hot'"}
return {"message": "Changed the the default sorting of comments on this post to 'hot'"}
extensions = IMAGE_FORMATS + VIDEO_FORMATS + AUDIO_FORMATS