Skip to content

Commit

Permalink
Fixed Function Type Hints
Browse files Browse the repository at this point in the history
  • Loading branch information
Tert0 committed Aug 16, 2021
1 parent 471f8b5 commit a04f696
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fastapi_discord/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async def get_token_response(self, payload: PAYLOAD) -> TokenResponse:
resp = await self.client_session.post(DISCORD_TOKEN_URL, data=payload)
return await resp.json()

async def get_access_token(self, code: str) -> Tuple[str, str]:
async def get_access_token(self, code: str) -> Tuple[Optional[str], Optional[str]]:
payload: TokenGrantPayload = {
"client_id": self.client_id,
"client_secret": self.client_secret,
Expand All @@ -106,7 +106,7 @@ async def get_access_token(self, code: str) -> Tuple[str, str]:
resp = await self.get_token_response(payload)
return resp.get("access_token"), resp.get("refresh_token")

async def refresh_access_token(self, refresh_token: str) -> Tuple[str, str]:
async def refresh_access_token(self, refresh_token: str) -> Tuple[Optional[str], Optional[str]]:
payload: RefreshTokenPayload = {
"client_id": self.client_id,
"client_secret": self.client_secret,
Expand Down

0 comments on commit a04f696

Please sign in to comment.