Skip to content

Commit

Permalink
Fix return type annotation (#1234)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehdgua01 authored Jul 8, 2022
1 parent a72b5e4 commit 4ae090e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions slack_sdk/oauth/token_rotation/async_rotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async def perform_user_token_rotation( # type: ignore
*,
installation: Installation,
minutes_before_expiration: int = 120, # 2 hours by default
) -> Optional[Bot]: # type: ignore
) -> Optional[Installation]:
"""Performs user token rotation if the underlying user token is expired / expiring.
Args:
Expand Down Expand Up @@ -136,7 +136,7 @@ async def perform_user_token_rotation( # type: ignore
refreshed_installation.user_token = refresh_response.get("access_token")
refreshed_installation.user_refresh_token = refresh_response.get("refresh_token")
refreshed_installation.user_token_expires_at = int(time()) + int(refresh_response.get("expires_in"))
return refreshed_installation # type: ignore
return refreshed_installation

except SlackApiError as e:
raise SlackTokenRotationError(e)

0 comments on commit 4ae090e

Please sign in to comment.