From a8f2c45b25c9d008de7a5e1e6f18cc47a259c73c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leynier=20Guti=C3=A9rrez=20Gonz=C3=A1lez?= Date: Mon, 17 Jan 2022 01:10:12 -0500 Subject: [PATCH] feat: add notion to enum of providers (#70) * feat: add notion to enum of providers * 'Refactored by Sourcery' (#71) Co-authored-by: Sourcery AI <> Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> --- gotrue/types.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gotrue/types.py b/gotrue/types.py index 2e7ea242..72b54cc7 100644 --- a/gotrue/types.py +++ b/gotrue/types.py @@ -17,9 +17,7 @@ def determine_session_or_user_model_from_response( response: Response, ) -> Union[Type[Session], Type[User]]: - if "access_token" in response.json(): - return Session - return User + return Session if "access_token" in response.json() else User class BaseModelFromResponse(BaseModel): @@ -138,6 +136,7 @@ class Provider(str, Enum): github = "github" gitlab = "gitlab" google = "google" + notion = "notion" slack = "slack" spotify = "spotify" twitter = "twitter"