Skip to content

Commit b689a70

Browse files
committed
Fixing quote inconsistencies
1 parent 4c6317b commit b689a70

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

packet/mail.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@
77

88

99
def send_start_packet_mail(packet):
10-
if app.config['MAIL_PROD']:
10+
if app.config["MAIL_PROD"]:
1111
recipients = ["<" + packet.freshman.rit_username + "@rit.edu>"]
12-
msg = Message(subject="CSH Packet Starts " + packet.start.strftime('%A, %B %-d'),
12+
msg = Message(subject="CSH Packet Starts " + packet.start.strftime("%A, %B %-d"),
1313
sender=app.config.get("MAIL_USERNAME"),
1414
recipients=recipients)
1515

16-
template = 'mail/packet_start'
17-
msg.body = render_template(template + '.txt', packet=packet)
18-
msg.html = render_template(template + '.html', packet=packet)
16+
template = "mail/packet_start"
17+
msg.body = render_template(template + ".txt", packet=packet)
18+
msg.html = render_template(template + ".html", packet=packet)
1919
app.logger.info("Sending mail to " + recipients[0])
2020
mail.send(msg)
2121

2222

2323
def send_report_mail(form_results, reporter):
24-
if app.config['MAIL_PROD']:
24+
if app.config["MAIL_PROD"]:
2525
recipients = ["<[email protected]>"]
2626
msg = Message(subject="Packet Report",
2727
sender=app.config.get("MAIL_USERNAME"),
2828
recipients=recipients)
2929

30-
person = form_results['person']
31-
report = form_results['report']
30+
person = form_results["person"]
31+
report = form_results["report"]
3232

33-
template = 'mail/report'
34-
msg.body = render_template(template + '.txt', person=person, report=report, reporter=reporter)
35-
msg.html = render_template(template + '.html', person=person, report=report, reporter=reporter)
33+
template = "mail/report"
34+
msg.body = render_template(template + ".txt", person=person, report=report, reporter=reporter)
35+
msg.html = render_template(template + ".html", person=person, report=report, reporter=reporter)
3636
app.logger.info("Sending mail to " + recipients[0])
3737
mail.send(msg)

packet/notifications.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def packet_signed_notification(packet, signer):
2828
subscriptions = NotificationSubscription.query.filter_by(freshman_username=packet.freshman_username)
2929
if subscriptions:
3030
notification_body = post_body
31-
notification_body["contents"]["en"] = signer + ' signed your packet! Congrats or I\'m Sorry'
32-
notification_body["headings"]["en"] = 'New Packet Signature!'
33-
notification_body["chrome_web_icon"] = 'https://profiles.csh.rit.edu/image/' + signer
31+
notification_body["contents"]["en"] = signer + " signed your packet! Congrats or I'm Sorry"
32+
notification_body["headings"]["en"] = "New Packet Signature!"
33+
notification_body["chrome_web_icon"] = "https://profiles.csh.rit.edu/image/" + signer
3434
notification_body["url"] = app.config["PROTOCOL"] + app.config["PACKET_INTRO"]
3535

3636
send_notification(notification_body, subscriptions, intro_onesignal_client)
@@ -41,10 +41,10 @@ def packet_100_percent_notification(packet):
4141
intro_subscriptions = NotificationSubscription.query.filter(NotificationSubscription.freshman_username.isnot(None))
4242
if member_subscriptions or intro_subscriptions:
4343
notification_body = post_body
44-
notification_body["contents"]["en"] = packet.freshman.name + ' got 💯 on packet!'
45-
notification_body["headings"]["en"] = 'New 100% on Packet!'
44+
notification_body["contents"]["en"] = packet.freshman.name + " got 💯 on packet!"
45+
notification_body["headings"]["en"] = "New 100% on Packet!"
4646
# TODO: Issue #156
47-
notification_body["chrome_web_icon"] = 'https://profiles.csh.rit.edu/image/' + packet.freshman_username
47+
notification_body["chrome_web_icon"] = "https://profiles.csh.rit.edu/image/" + packet.freshman_username
4848

4949
send_notification(notification_body, member_subscriptions, csh_onesignal_client)
5050
send_notification(notification_body, intro_subscriptions, intro_onesignal_client)
@@ -54,8 +54,8 @@ def packet_starting_notification(packet):
5454
subscriptions = NotificationSubscription.query.filter_by(freshman_username=packet.freshman_username)
5555
if subscriptions:
5656
notification_body = post_body
57-
notification_body["contents"]["en"] = 'Log into your packet, and get started meeting people!'
58-
notification_body["headings"]["en"] = 'Your packet has begun!'
57+
notification_body["contents"]["en"] = "Log into your packet, and get started meeting people!"
58+
notification_body["headings"]["en"] = "Your packet has begun!"
5959
notification_body["url"] = app.config["PROTOCOL"] + app.config["PACKET_INTRO"]
6060
notification_body["send_after"] = packet.start.strftime("%Y-%m-%d %H:%M:%S")
6161

@@ -66,8 +66,8 @@ def packets_starting_notification(start_date):
6666
member_subscriptions = NotificationSubscription.query.filter(NotificationSubscription.member.isnot(None))
6767
if member_subscriptions:
6868
notification_body = post_body
69-
notification_body["contents"]["en"] = 'New packets have started, visit packet to see them!'
70-
notification_body["headings"]["en"] = 'Packets Start Today!'
69+
notification_body["contents"]["en"] = "New packets have started, visit packet to see them!"
70+
notification_body["headings"]["en"] = "Packets Start Today!"
7171
notification_body["send_after"] = start_date.strftime("%Y-%m-%d %H:%M:%S")
7272

7373
send_notification(notification_body, member_subscriptions, csh_onesignal_client)

0 commit comments

Comments
 (0)