Skip to content

Commit

Permalink
feat: add notion to enum of providers (#70)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
leynier and sourcery-ai[bot] authored Jan 17, 2022
1 parent 5034285 commit a8f2c45
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gotrue/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -138,6 +136,7 @@ class Provider(str, Enum):
github = "github"
gitlab = "gitlab"
google = "google"
notion = "notion"
slack = "slack"
spotify = "spotify"
twitter = "twitter"
Expand Down

0 comments on commit a8f2c45

Please sign in to comment.