Skip to content
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

Fixed PEP8 issues except E501. #466

Merged
merged 9 commits into from
May 30, 2018
Merged

Fixed PEP8 issues except E501. #466

merged 9 commits into from
May 30, 2018

Conversation

blackpioter
Copy link
Contributor

This one is in regard to Issue #464.

@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Oct 27, 2017
@SendGridDX
Copy link

SendGridDX commented Oct 27, 2017

CLA assistant check
All committers have signed the CLA.

@codecov-io
Copy link

codecov-io commented Oct 27, 2017

Codecov Report

Merging #466 into master will decrease coverage by 0.18%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #466      +/-   ##
==========================================
- Coverage    88.1%   87.91%   -0.19%     
==========================================
  Files          30       30              
  Lines         933      935       +2     
  Branches      114      115       +1     
==========================================
  Hits          822      822              
- Misses         54       55       +1     
- Partials       57       58       +1
Impacted Files Coverage Δ
sendgrid/helpers/inbound/config.py 93.93% <ø> (ø) ⬆️
sendgrid/helpers/inbound/send.py 93.75% <ø> (ø) ⬆️
sendgrid/helpers/inbound/parse.py 37.68% <ø> (ø) ⬆️
sendgrid/helpers/mail/mail.py 94.77% <0%> (-1.26%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0007d66...29717f3. Read the comment docs.

Copy link
Contributor

@mbernier mbernier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I marked a couple examples of this, can you please move the lists of params to each have their own line? That cleans up the code for readability and it's so nice!

@@ -9,7 +9,8 @@
# Retrieve email statistics by client type. #
# GET /clients/stats #

params = {'aggregated_by': 'day', 'start_date': '2016-01-01', 'end_date': '2016-04-01'}
params = {'aggregated_by': 'day',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be ok to be pedantic here and ask that end_date be moved to the next line too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@@ -19,10 +20,10 @@
# Retrieve stats by a specific client type. #
# GET /clients/{client_type}/stats #

params = {'aggregated_by': 'day', 'start_date': '2016-01-01', 'end_date': '2016-04-01'}
params = {'aggregated_by': 'day',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be ok to be pedantic here and ask that end_date be moved to the next line too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

}
params = {'list_id': 1}
list_id = "test_url_param"
response = sg.client.contactdb.lists._(list_id).patch(request_body=data, query_params=params)
response = sg.client.contactdb.lists._(list_id).patch(
request_body=data, query_params=params)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please move query_params to the next line?

}
params = {'segment_id': 'test_string'}
segment_id = "test_url_param"
response = sg.client.contactdb.segments._(segment_id).patch(request_body=data, query_params=params)
response = sg.client.contactdb.segments._(segment_id).patch(
request_body=data, query_params=params)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please move query_params to the next line?

@@ -9,9 +9,9 @@
# Retrieve email statistics by device type. #
# GET /devices/stats #

params = {'aggregated_by': 'day', 'limit': 1, 'start_date': '2016-01-01', 'end_date': '2016-04-01', 'offset': 1}
params = {'aggregated_by': 'day', 'limit': 1,
'start_date': '2016-01-01', 'end_date': '2016-04-01', 'offset': 1}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please move end_date and offset to their own lines?

@@ -9,9 +9,9 @@
# Retrieve email statistics by country and state/province. #
# GET /geo/stats #

params = {'end_date': '2016-04-01', 'country': 'US', 'aggregated_by': 'day', 'limit': 1, 'offset': 1, 'start_date': '2016-01-01'}
params = {'end_date': '2016-04-01', 'country': 'US', 'aggregated_by': 'day',
'limit': 1, 'offset': 1, 'start_date': '2016-01-01'}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please move the params to each be on their own line?

@@ -104,22 +108,28 @@ def build_kitchen_sink():
mail_settings = MailSettings()
mail_settings.bcc_settings = BCCSettings(True, Email("[email protected]"))
mail_settings.bypass_list_management = BypassListManagement(True)
mail_settings.footer_settings = FooterSettings(True, "Footer Text", "<html><body>Footer Text</body></html>")
mail_settings.footer_settings = FooterSettings(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please move the params to each be on their own line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@mbernier mbernier added difficulty: hard fix is hard in difficulty hacktoberfest labels Oct 28, 2017
@blackpioter
Copy link
Contributor Author

@mbernier I've updated PR according to comments. Let me know if you got some more ideas.

@mbernier
Copy link
Contributor

Nice! Thank you so much!

@mbernier
Copy link
Contributor

Had some merge conflicts. I believe that I resolved them properly. I am letting the build run to verify.

@blackpioter
Copy link
Contributor Author

@mbernier cool. Build seems to be clean after conflicts resolved.

@thinkingserious
Copy link
Contributor

@blackpioter

We have not been able to merge your Pull Request, but because you are awesome - we wanted to make sure you could still get a SendGrid Hacktoberfest shirt.

Please go fill out our swag form before Nov 5th and we will send the shirt! (We know that you might have tried this before and it didn’t work, sorry about that!)

You have till Nov 5th to fill out this form in order to get the Hacktoberfest shirt!

Thank you for contributing during Hacktoberfest! We hope to see you in the repos soon! Just so you know, we always give away a SendGrid shirt for your first ever non-Hacktoberfest PR that gets merged.

@thinkingserious thinkingserious added difficulty: easy fix is easy in difficulty type: twilio enhancement feature request on Twilio's roadmap and removed difficulty: hard fix is hard in difficulty labels Feb 27, 2018
@thinkingserious thinkingserious merged commit 52f86b7 into sendgrid:master May 30, 2018
@thinkingserious
Copy link
Contributor

Hello @blackpioter,

Thanks again for the PR!

We appreciate your contribution and look forward to continued collaboration. Thanks!

Team SendGrid DX

@childish-sambino childish-sambino mentioned this pull request Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: easy fix is easy in difficulty status: code review request requesting a community code review or review from Twilio type: twilio enhancement feature request on Twilio's roadmap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants