diff --git a/gspread/auth.py b/gspread/auth.py index 49a70e571..d1c60402d 100644 --- a/gspread/auth.py +++ b/gspread/auth.py @@ -189,7 +189,7 @@ def oauth( authorized_user_filename = Path(authorized_user_filename) creds = load_credentials(filename=authorized_user_filename) - if not type(creds) is Credentials: + if not isinstance(creds, Credentials): with open(credentials_filename) as json_file: client_config = json.load(json_file) creds = flow(client_config=client_config, scopes=scopes)