-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Upgrade python syntax through pyupgrade #7326
Conversation
iamareebjamal
commented
Oct 6, 2020
•
edited
Loading
edited
- Syntax Upgrades
- Unused Imports removed
- Redundant Alias removed
@@ -8,11 +8,11 @@ class TestFields(TestCase): | |||
def test_extracts_fields(self): | |||
self.assertTrue( | |||
set(extract_from_marshmallow(SettingSchemaPublic)).issuperset( | |||
set(['id', 'app_name', 'is_paytm_activated']) | |||
{'id', 'app_name', 'is_paytm_activated'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black would make changes.
'title': u'Invitation to Submit Papers for {event_name}', | ||
'message': u"You have been invited to submit papers for <strong>{event_name}</strong>.", | ||
'title': 'Invitation to Submit Papers for {event_name}', | ||
'message': "You have been invited to submit papers for <strong>{event_name}</strong>.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (95 > 90 characters)
'message': ( | ||
u"Your email has been changed from {email} to {new_email}.<br>Please verify your new email." | ||
"Your email has been changed from {email} to {new_email}.<br>Please verify your new email." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (103 > 90 characters)
+ u"<br/>Please contact the organizer for more info " | ||
+ u"<br/>Message from the organizer: {cancel_note}." | ||
"Your order for <a href='{event_url}'>{event_name}</a> has been cancelled by the organizer " | ||
+ "<br/>You can visit your cancelled ticket here : <a href='{order_url}'>{invoice_id}</a> " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (103 > 90 characters)
+ u"<br/>You can visit your cancelled ticket here : <a href='{order_url}'>{invoice_id}</a> " | ||
+ u"<br/>Please contact the organizer for more info " | ||
+ u"<br/>Message from the organizer: {cancel_note}." | ||
"Your order for <a href='{event_url}'>{event_name}</a> has been cancelled by the organizer " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (104 > 90 characters)
"Please pay within 2 days.<br><br>" | ||
"Pay Now: <a href='{payment_url}'>{payment_url}</a><br><br>" | ||
"Late payments can be subject to a 5% finance fee.<br><br>" | ||
"A detailed invoice is available in <a href='https://eventyay.com/account/billing/invoices/'>the billing area</a> of your account. If you have any questions about invoices, please find more information on our FAQ at https://support.eventyay.com.<br><br>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (266 > 90 characters)
u"<em>Thank you for using {app_name}!</em><br><br>" | ||
u"{app_name} Team" | ||
"Hello {name},<br><br>" | ||
"This is a reminder that we haven't received your payment for your invoice for {event_name} for {date}. Payment is fast and simple using your credit card or PayPal account.<br><br>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (193 > 90 characters)
), | ||
'sent_at': '15th day of the month', | ||
}, | ||
MONTHLY_PAYMENT_PRE_DUE_EMAIL: { | ||
'recipient': 'Owner', | ||
'subject': u'Reminder: Your invoice for {event_name} for {date} is available on {app_name}', | ||
'subject': 'Reminder: Your invoice for {event_name} for {date} is available on {app_name}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (99 > 90 characters)
"Amount Due: {amount}<br><br>" | ||
"Please pay within 15 days.<br><br>" | ||
"Pay Now at: <a href='{payment_url}'>{payment_url}</a><br><br>" | ||
"A detailed invoice is available in <a href='https://eventyay.com/account/billing/invoices/'>the billing area</a> of your account. If you have any questions about invoices, please find more information on our FAQ at https://support.eventyay.com.<br><br>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (266 > 90 characters)
u"<em>Thank you for using {app_name}!</em><br><br>" | ||
u"{app_name} Team" | ||
"Hello {name},<br><br>" | ||
"Just a friendly reminder that we haven't received your payment for your invoice for {event_name} for {date}. Payment is fast and simple using your credit card or PayPal account.<br><br>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (199 > 90 characters)
), | ||
'sent_at': '1st day of the month', | ||
}, | ||
MONTHLY_PAYMENT_FOLLOWUP_EMAIL: { | ||
'recipient': 'Owner', | ||
'subject': u'Reminder: Your invoice for {event_name} for {date} is available on {app_name}', | ||
'subject': 'Reminder: Your invoice for {event_name} for {date} is available on {app_name}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (99 > 90 characters)
"Amount Due: {amount}<br><br>" | ||
"Please pay within 30 days.<br><br>" | ||
"Pay Now at: <a href='{payment_url}'>{payment_url}</a><br><br>" | ||
"A detailed invoice is available in <a href='https://eventyay.com/account/billing/invoices/'>the billing area</a> of your account. If you have any questions about invoices, please find more information on our FAQ at https://support.eventyay.com.<br><br>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (266 > 90 characters)
u"<em>Thank you for using {app_name}!</em><br><br>" | ||
u"{app_name} Team" | ||
"Hello {name},<br><br>" | ||
"The invoice for your event {event_name} on eventyay.com for {date} is now available. Your invoice payment is due within 30 days.<br><br>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (150 > 90 characters)
u"purchase your ticket for this event." | ||
u"<br><br><em>Looking forward to seeing you at the event.</em>" | ||
"This is just a gentle reminder that the payment for your order {invoice_id} is still left." | ||
+ "<br/> The tickets for this event are still available. <a href='{order_url}'>Click here</a> to " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (110 > 90 characters)
+ u"<br/> The tickets for this event are still available. <a href='{order_url}'>Click here</a> to " | ||
u"purchase your ticket for this event." | ||
u"<br><br><em>Looking forward to seeing you at the event.</em>" | ||
"This is just a gentle reminder that the payment for your order {invoice_id} is still left." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (104 > 90 characters)
+ u"To accept the role please sign up using the following link: <a href='{link}' target='_blank'>Link</a>." | ||
"Hello {email},<br><br>" | ||
+ "You've been invited to be a <strong>{role}</strong> at <strong>{event}</strong>.<br>" | ||
+ "To accept the role please sign up using the following link: <a href='{link}' target='_blank'>Link</a>." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (118 > 90 characters)
+ u"You've been invited to be a <strong>{role}</strong> at <strong>{event}</strong>.<br>" | ||
+ u"To accept the role please sign up using the following link: <a href='{link}' target='_blank'>Link</a>." | ||
"Hello {email},<br><br>" | ||
+ "You've been invited to be a <strong>{role}</strong> at <strong>{event}</strong>.<br>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (100 > 90 characters)
'message': ( | ||
u"Your password has been successfully changed. Please login with your new password." | ||
"Your password has been successfully changed. Please login with your new password." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (95 > 90 characters)
'message': ( | ||
u"Please use the following link to reset your password and verify your account." | ||
"Please use the following link to reset your password and verify your account." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (91 > 90 characters)
'message': ( | ||
u"Please use the following link to reset your password.<br> <a href='{link}' target='_blank'>{link}</a>" | ||
"Please use the following link to reset your password.<br> <a href='{link}' target='_blank'>{link}</a>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (115 > 90 characters)
Codecov Report
@@ Coverage Diff @@
## development #7326 +/- ##
============================================
Coverage 64.08% 64.08%
============================================
Files 259 259
Lines 13104 13104
============================================
Hits 8398 8398
Misses 4706 4706
Continue to review full report at Codecov.
|
u"Hi {email},<br/>" | ||
+ u"Your email has been already changed from {email} to {new_email}. You should verify your new email" | ||
"Hi {email},<br/>" | ||
+ "Your email has been already changed from {email} to {new_email}. You should verify your new email" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (113 > 90 characters)
u"Hi {email},<br/>" | ||
+ u"Please visit this link to confirm your email: <a href='{link}' target='_blank'>{link}</a>" | ||
"Hi {email},<br/>" | ||
+ "Please visit this link to confirm your email: <a href='{link}' target='_blank'>{link}</a>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (106 > 90 characters)
+ u"<br/> Visit this link to view the session: <a href='{link}' target='_blank'>{link}</a>" | ||
"Hi {email},<br/>" | ||
+ "The event <strong>{event_name}</strong> has received a new session proposal. " | ||
+ "<br/> Visit this link to view the session: <a href='{link}' target='_blank'>{link}</a>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (102 > 90 characters)
+ u"The event <strong>{event_name}</strong> has received a new session proposal. " | ||
+ u"<br/> Visit this link to view the session: <a href='{link}' target='_blank'>{link}</a>" | ||
"Hi {email},<br/>" | ||
+ "The event <strong>{event_name}</strong> has received a new session proposal. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (93 > 90 characters)
+ u"The schedule for session <strong>{session_name}</strong> has been changed. " | ||
+ u"<br/> Visit this link to view the session: {link}" | ||
"Hi {email},<br/>" | ||
+ "The schedule for session <strong>{session_name}</strong> has been changed. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (91 > 90 characters)
'https://creativecommons.org/licenses/by-nc/4.0', | ||
'https://licensebuttons.net/l/by-nc/3.0/88x31.png', | ||
'https://licensebuttons.net/l/by-nc/3.0/80x15.png', | ||
), | ||
'Attribution-NonCommercial-NoDerivs': ( | ||
'Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International License', | ||
u'This license only allows others to download the work and share them with others as long as they credit the ' | ||
u'copyright holder, but they can’t change them in any way or use them commercially.', | ||
'This license only allows others to download the work and share them with others as long as they credit the ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (117 > 90 characters)
u'works must also acknowledge the copyright holder and be non-commercial, they don’t have to license their ' | ||
u'derivative works on the same terms.', | ||
'This license lets others remix, tweak, and build upon the work non-commercially, and although their new ' | ||
'works must also acknowledge the copyright holder and be non-commercial, they don’t have to license their ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (115 > 90 characters)
u'This license lets others remix, tweak, and build upon the work non-commercially, and although their new ' | ||
u'works must also acknowledge the copyright holder and be non-commercial, they don’t have to license their ' | ||
u'derivative works on the same terms.', | ||
'This license lets others remix, tweak, and build upon the work non-commercially, and although their new ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (114 > 90 characters)
'https://creativecommons.org/licenses/by-sa/4.0', | ||
'https://licensebuttons.net/l/by-sa/3.0/88x31.png', | ||
'https://licensebuttons.net/l/by-sa/3.0/80x15.png', | ||
), | ||
'Attribution-NoDerivs': ( | ||
'Creative Commons Attribution-NoDerivs 4.0 International License', | ||
u'This license allows for redistribution, commercial and non-commercial, as long as it is passed along ' | ||
u'unchanged and in whole, with credit to the copyright holder.', | ||
'This license allows for redistribution, commercial and non-commercial, as long as it is passed along ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (111 > 90 characters)
u'This license lets others remix, tweak, and build upon the work even for commercial purposes, as long as ' | ||
u'they credit the copyright holder and license their new creations under the identical terms.', | ||
'This license lets others remix, tweak, and build upon the work even for commercial purposes, as long as ' | ||
'they credit the copyright holder and license their new creations under the identical terms.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (102 > 90 characters)
'https://creativecommons.org/licenses/by/4.0', | ||
'https://licensebuttons.net/l/by/3.0/88x31.png', | ||
'https://licensebuttons.net/l/by/3.0/80x15.png', | ||
), | ||
'Attribution-ShareAlike': ( | ||
'Creative Commons Attribution-ShareAlike 4.0 International License', | ||
u'This license lets others remix, tweak, and build upon the work even for commercial purposes, as long as ' | ||
u'they credit the copyright holder and license their new creations under the identical terms.', | ||
'This license lets others remix, tweak, and build upon the work even for commercial purposes, as long as ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (114 > 90 characters)
'https://en.wikipedia.org/wiki/All_rights_reserved', | ||
'', | ||
'', | ||
), | ||
'Attribution': ( | ||
'Creative Commons Attribution 4.0 International License', | ||
u'This license lets others distribute, remix, tweak, and build upon the work, even commercially, as long as ' | ||
u'they credit the copyright holder for the original creation.', | ||
'This license lets others distribute, remix, tweak, and build upon the work, even commercially, as long as ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (116 > 90 characters)
@@ -10,74 +8,74 @@ | |||
# Licence Name : ( Long Name, Description, Licence URL, Licence Logo, Licence Compact Logo ) | |||
'All rights reserved': ( | |||
'All rights reserved', | |||
u'The copyright holder reserves, or holds for their own use, all the rights provided by copyright law under ' | |||
u'one specific copyright treaty.', | |||
'The copyright holder reserves, or holds for their own use, all the rights provided by copyright law under ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (116 > 90 characters)
@@ -14,7 +14,7 @@ | |||
def generate_checksum(param_dict, merchant_key, salt=None): | |||
params_string = __get_param_string__(param_dict) | |||
salt = salt if salt else __id_generator__(4) | |||
final_string = '%s|%s' % (params_string, salt) | |||
final_string = f'{params_string}|{salt}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black would make changes.
This pull request introduces 1 alert and fixes 5 when merging 89b7afb into d64e389 - view on LGTM.com new alerts:
fixed alerts:
|