From cd1faf3f886be3d2b32d07c8ce3c05490ca6d018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leynier=20Guti=C3=A9rrez=20Gonz=C3=A1lez?= Date: Mon, 17 Jan 2022 01:03:35 -0500 Subject: [PATCH 1/2] feat: add notion to enum of providers --- gotrue/types.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gotrue/types.py b/gotrue/types.py index 2e7ea242..1244ab78 100644 --- a/gotrue/types.py +++ b/gotrue/types.py @@ -138,6 +138,7 @@ class Provider(str, Enum): github = "github" gitlab = "gitlab" google = "google" + notion = "notion" slack = "slack" spotify = "spotify" twitter = "twitter" From 0907ad01b12aa580a7140fd689c4531b96806f96 Mon Sep 17 00:00:00 2001 From: "sourcery-ai[bot]" <58596630+sourcery-ai[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 01:07:38 -0500 Subject: [PATCH 2/2] 'Refactored by Sourcery' (#71) Co-authored-by: Sourcery AI <> --- gotrue/types.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gotrue/types.py b/gotrue/types.py index 1244ab78..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):