-
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
744e290
Fixed PEP8 issues except E501.
blackpioter 7c19372
Updated according to PR comments.
blackpioter 853c829
Merge branch 'master' into master
blackpioter e3ec510
Merge branch 'master' into master
blackpioter 47de889
Fix PEP8 E501 where possible.
blackpioter 0bd8dc1
Fix PEP8 E501 where possible.
blackpioter e6af3a3
Merge branch 'master' into master
78a3a05
Merge branch 'master' into master
29717f3
Merge branch 'master' into master
thinkingserious File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,9 @@ | |
# POST /alerts # | ||
|
||
data = { | ||
"email_to": "[email protected]", | ||
"frequency": "daily", | ||
"type": "stats_notification" | ||
"email_to": "[email protected]", | ||
"frequency": "daily", | ||
"type": "stats_notification" | ||
} | ||
response = sg.client.alerts.post(request_body=data) | ||
print(response.status_code) | ||
|
@@ -33,7 +33,7 @@ | |
# PATCH /alerts/{alert_id} # | ||
|
||
data = { | ||
"email_to": "[email protected]" | ||
"email_to": "[email protected]" | ||
} | ||
alert_id = "test_url_param" | ||
response = sg.client.alerts._(alert_id).patch(request_body=data) | ||
|
@@ -60,4 +60,3 @@ | |
print(response.status_code) | ||
print(response.body) | ||
print(response.headers) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,9 @@ | |
# POST /asm/groups # | ||
|
||
data = { | ||
"description": "Suggestions for products our users might like.", | ||
"is_default": True, | ||
"name": "Product Suggestions" | ||
"description": "Suggestions for products our users might like.", | ||
"is_default": True, | ||
"name": "Product Suggestions" | ||
} | ||
response = sg.client.asm.groups.post(request_body=data) | ||
print(response.status_code) | ||
|
@@ -34,9 +34,9 @@ | |
# PATCH /asm/groups/{group_id} # | ||
|
||
data = { | ||
"description": "Suggestions for items our users might like.", | ||
"id": 103, | ||
"name": "Item Suggestions" | ||
"description": "Suggestions for items our users might like.", | ||
"id": 103, | ||
"name": "Item Suggestions" | ||
} | ||
group_id = "test_url_param" | ||
response = sg.client.asm.groups._(group_id).patch(request_body=data) | ||
|
@@ -69,13 +69,14 @@ | |
# POST /asm/groups/{group_id}/suppressions # | ||
|
||
data = { | ||
"recipient_emails": [ | ||
"[email protected]", | ||
"[email protected]" | ||
] | ||
"recipient_emails": [ | ||
"[email protected]", | ||
"[email protected]" | ||
] | ||
} | ||
group_id = "test_url_param" | ||
response = sg.client.asm.groups._(group_id).suppressions.post(request_body=data) | ||
response = sg.client.asm.groups._( | ||
group_id).suppressions.post(request_body=data) | ||
print(response.status_code) | ||
print(response.body) | ||
print(response.headers) | ||
|
@@ -95,14 +96,15 @@ | |
# POST /asm/groups/{group_id}/suppressions/search # | ||
|
||
data = { | ||
"recipient_emails": [ | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]" | ||
] | ||
"recipient_emails": [ | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]" | ||
] | ||
} | ||
group_id = "test_url_param" | ||
response = sg.client.asm.groups._(group_id).suppressions.search.post(request_body=data) | ||
response = sg.client.asm.groups._( | ||
group_id).suppressions.search.post(request_body=data) | ||
print(response.status_code) | ||
print(response.body) | ||
print(response.headers) | ||
|
@@ -132,10 +134,10 @@ | |
# POST /asm/suppressions/global # | ||
|
||
data = { | ||
"recipient_emails": [ | ||
"[email protected]", | ||
"[email protected]" | ||
] | ||
"recipient_emails": [ | ||
"[email protected]", | ||
"[email protected]" | ||
] | ||
} | ||
response = sg.client.asm.suppressions._("global").post(request_body=data) | ||
print(response.status_code) | ||
|
@@ -171,4 +173,3 @@ | |
print(response.status_code) | ||
print(response.body) | ||
print(response.headers) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,24 +10,24 @@ | |
# POST /campaigns # | ||
|
||
data = { | ||
"categories": [ | ||
"spring line" | ||
], | ||
"custom_unsubscribe_url": "", | ||
"html_content": "<html><head><title></title></head><body><p>Check out our spring line!</p></body></html>", | ||
"ip_pool": "marketing", | ||
"list_ids": [ | ||
110, | ||
124 | ||
], | ||
"plain_content": "Check out our spring line!", | ||
"segment_ids": [ | ||
110 | ||
], | ||
"sender_id": 124451, | ||
"subject": "New Products for Spring!", | ||
"suppression_group_id": 42, | ||
"title": "March Newsletter" | ||
"categories": [ | ||
"spring line" | ||
], | ||
"custom_unsubscribe_url": "", | ||
"html_content": "<html><head><title></title></head><body><p>Check out our spring line!</p></body></html>", | ||
"ip_pool": "marketing", | ||
"list_ids": [ | ||
110, | ||
124 | ||
], | ||
"plain_content": "Check out our spring line!", | ||
"segment_ids": [ | ||
110 | ||
], | ||
"sender_id": 124451, | ||
"subject": "New Products for Spring!", | ||
"suppression_group_id": 42, | ||
"title": "March Newsletter" | ||
} | ||
response = sg.client.campaigns.post(request_body=data) | ||
print(response.status_code) | ||
|
@@ -49,13 +49,13 @@ | |
# PATCH /campaigns/{campaign_id} # | ||
|
||
data = { | ||
"categories": [ | ||
"summer line" | ||
], | ||
"html_content": "<html><head><title></title></head><body><p>Check out our summer line!</p></body></html>", | ||
"plain_content": "Check out our summer line!", | ||
"subject": "New Products for Summer!", | ||
"title": "May Newsletter" | ||
"categories": [ | ||
"summer line" | ||
], | ||
"html_content": "<html><head><title></title></head><body><p>Check out our summer line!</p></body></html>", | ||
"plain_content": "Check out our summer line!", | ||
"subject": "New Products for Summer!", | ||
"title": "May Newsletter" | ||
} | ||
campaign_id = "test_url_param" | ||
response = sg.client.campaigns._(campaign_id).patch(request_body=data) | ||
|
@@ -88,10 +88,11 @@ | |
# PATCH /campaigns/{campaign_id}/schedules # | ||
|
||
data = { | ||
"send_at": 1489451436 | ||
"send_at": 1489451436 | ||
} | ||
campaign_id = "test_url_param" | ||
response = sg.client.campaigns._(campaign_id).schedules.patch(request_body=data) | ||
response = sg.client.campaigns._( | ||
campaign_id).schedules.patch(request_body=data) | ||
print(response.status_code) | ||
print(response.body) | ||
print(response.headers) | ||
|
@@ -101,7 +102,7 @@ | |
# POST /campaigns/{campaign_id}/schedules # | ||
|
||
data = { | ||
"send_at": 1489771528 | ||
"send_at": 1489771528 | ||
} | ||
campaign_id = "test_url_param" | ||
response = sg.client.campaigns._(campaign_id).schedules.post(request_body=data) | ||
|
@@ -144,11 +145,11 @@ | |
# POST /campaigns/{campaign_id}/schedules/test # | ||
|
||
data = { | ||
"to": "[email protected]" | ||
"to": "[email protected]" | ||
} | ||
campaign_id = "test_url_param" | ||
response = sg.client.campaigns._(campaign_id).schedules.test.post(request_body=data) | ||
response = sg.client.campaigns._( | ||
campaign_id).schedules.test.post(request_body=data) | ||
print(response.status_code) | ||
print(response.body) | ||
print(response.headers) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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', | ||
'start_date': '2016-01-01', 'end_date': '2016-04-01'} | ||
response = sg.client.clients.stats.get(query_params=params) | ||
print(response.status_code) | ||
print(response.body) | ||
|
@@ -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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Updated. |
||
'start_date': '2016-01-01', 'end_date': '2016-04-01'} | ||
client_type = "test_url_param" | ||
response = sg.client.clients._(client_type).stats.get(query_params=params) | ||
print(response.status_code) | ||
print(response.body) | ||
print(response.headers) | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.