From 530f5f9cbba01e6be29c98d75b9e8e3fb8a4fdd3 Mon Sep 17 00:00:00 2001 From: Emile Caron Date: Fri, 26 Jul 2019 01:23:25 +0200 Subject: [PATCH] Use cls parameter instead of class (#341) Use cls parameter instead of explicit `Credentials` reference to allow subclassing --- google/oauth2/credentials.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/oauth2/credentials.py b/google/oauth2/credentials.py index b56e31426..9e1141646 100644 --- a/google/oauth2/credentials.py +++ b/google/oauth2/credentials.py @@ -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,