-
Notifications
You must be signed in to change notification settings - Fork 165
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
String Formatting Updated #141
Changes from 4 commits
b2f831d
120b505
134ec27
4c915e6
a1cc16b
b45e112
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,9 @@ def __init__(self, domain, token, telemetry=True): | |
self.client = RestClient(jwt=token, telemetry=telemetry) | ||
|
||
def _url(self, id=None): | ||
url = 'https://%s/api/v2/connections' % self.domain | ||
url = 'https://{}/api/v2/connections'.format(self.domain) | ||
if id is not None: | ||
return url + '/' + id | ||
return '{}/{}'.format(url, id) | ||
return url | ||
|
||
def all(self, strategy=None, fields=None, include_fields=True, page=None, per_page=None, extra_params=None): | ||
|
@@ -138,5 +138,4 @@ def delete_user_by_email(self, id, email): | |
Returns: | ||
An empty dict. | ||
""" | ||
return self.client.delete(self._url(id) + '/users', params={'email': email}) | ||
|
||
return self.client.delete('{}/users'.format(self._url(id)), params={'email': email}) | ||
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. This is confusing to read ... how about:
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. @joshcanhelp
For readability we can change this to or use the same or can use Let me know your thought on this. 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. Let's leave it as it was before:
I don't think the string formatting is adding anything here. 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. Ok, left it as it was before. |
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.
Out of scope, let's leave this out.
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.
Code reverted