Skip to content

Commit a8f2c45

Browse files
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>
1 parent 5034285 commit a8f2c45

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

gotrue/types.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
def determine_session_or_user_model_from_response(
1818
response: Response,
1919
) -> Union[Type[Session], Type[User]]:
20-
if "access_token" in response.json():
21-
return Session
22-
return User
20+
return Session if "access_token" in response.json() else User
2321

2422

2523
class BaseModelFromResponse(BaseModel):
@@ -138,6 +136,7 @@ class Provider(str, Enum):
138136
github = "github"
139137
gitlab = "gitlab"
140138
google = "google"
139+
notion = "notion"
141140
slack = "slack"
142141
spotify = "spotify"
143142
twitter = "twitter"

0 commit comments

Comments
 (0)