Skip to content

Commit

Permalink
feat: Update python super call to newer version
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Added super call feature new to Python3
  • Loading branch information
rmkeezer committed Apr 10, 2020
1 parent d60ae58 commit f038e10
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ibm_cloud_sdk_core/api_exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ApiException(Exception):

def __init__(self, code: int, *, message: Optional[str] = None, http_response: Optional[Response] = None):
# Call the base class constructor with the parameters it needs
super(ApiException, self).__init__(message)
super().__init__(message)
self.message = message
self.code = code
self.http_response = http_response
Expand Down
4 changes: 2 additions & 2 deletions ibm_cloud_sdk_core/cp4d_token_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def __init__(self,
url = url + '/v1/preauth/validateAuth'
self.headers = headers
self.proxies = proxies
super(CP4DTokenManager, self).__init__(url, disable_ssl_verification=disable_ssl_verification,
token_name=self.TOKEN_NAME)
super().__init__(url, disable_ssl_verification=disable_ssl_verification,
token_name=self.TOKEN_NAME)

def request_token(self) -> dict:
"""Makes a request for a token.
Expand Down
2 changes: 1 addition & 1 deletion ibm_cloud_sdk_core/iam_token_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(self,
self.client_secret = client_secret
self.headers = headers
self.proxies = proxies
super(IAMTokenManager, self).__init__(
super().__init__(
self.url, disable_ssl_verification=disable_ssl_verification, token_name=self.TOKEN_NAME)

def request_token(self) -> dict:
Expand Down
4 changes: 2 additions & 2 deletions test/test_jwt_token_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def __init__(self, url=None, access_token=None):
self.url = url
self.access_token = access_token
self.request_count = 0 # just for tests to see how many times request was called
super(JWTTokenManagerMockImpl, self).__init__(url, disable_ssl_verification=access_token,
token_name='access_token')
super().__init__(url, disable_ssl_verification=access_token,
token_name='access_token')

def request_token(self):
self.request_count += 1
Expand Down

0 comments on commit f038e10

Please sign in to comment.