-
Notifications
You must be signed in to change notification settings - Fork 714
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
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
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.
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', |
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.
Would it be ok to be pedantic here and ask that end_date be moved to the next line too?
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.
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', |
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.
Would it be ok to be pedantic here and ask that end_date be moved to the next line too?
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.
Updated.
examples/contactdb/contactdb.py
Outdated
} | ||
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) |
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.
Can you please move query_params to the next line?
examples/contactdb/contactdb.py
Outdated
} | ||
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) |
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.
Can you please move query_params to the next line?
examples/devices/devices.py
Outdated
@@ -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} |
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.
Can you please move end_date and offset to their own lines?
examples/geo/geo.py
Outdated
@@ -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'} |
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.
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( |
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.
can you please move the params to each be on their own line?
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.
Updated.
@mbernier I've updated PR according to comments. Let me know if you got some more ideas. |
Nice! Thank you so much! |
Had some merge conflicts. I believe that I resolved them properly. I am letting the build run to verify. |
@mbernier cool. Build seems to be clean after conflicts resolved. |
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. |
Hello @blackpioter, |
This one is in regard to Issue #464.