Skip to content

Commit

Permalink
Use cls parameter instead of class (#341)
Browse files Browse the repository at this point in the history
Use cls parameter instead of explicit `Credentials` reference to allow subclassing
  • Loading branch information
emilecaron authored and busunkim96 committed Jul 25, 2019
1 parent 0958d7a commit 530f5f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google/oauth2/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def from_authorized_user_info(cls, info, scopes=None):
'Authorized user info was not in the expected format, missing '
'fields {}.'.format(', '.join(missing)))

return Credentials(
return cls(
None, # No access token, must be refreshed.
refresh_token=info['refresh_token'],
token_uri=_GOOGLE_OAUTH2_TOKEN_ENDPOINT,
Expand Down

0 comments on commit 530f5f9

Please # to comment.