Skip to content

Commit 4ae090e

Browse files
authored
Fix return type annotation (#1234)
1 parent a72b5e4 commit 4ae090e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

slack_sdk/oauth/token_rotation/async_rotator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async def perform_user_token_rotation( # type: ignore
107107
*,
108108
installation: Installation,
109109
minutes_before_expiration: int = 120, # 2 hours by default
110-
) -> Optional[Bot]: # type: ignore
110+
) -> Optional[Installation]:
111111
"""Performs user token rotation if the underlying user token is expired / expiring.
112112
113113
Args:
@@ -136,7 +136,7 @@ async def perform_user_token_rotation( # type: ignore
136136
refreshed_installation.user_token = refresh_response.get("access_token")
137137
refreshed_installation.user_refresh_token = refresh_response.get("refresh_token")
138138
refreshed_installation.user_token_expires_at = int(time()) + int(refresh_response.get("expires_in"))
139-
return refreshed_installation # type: ignore
139+
return refreshed_installation
140140

141141
except SlackApiError as e:
142142
raise SlackTokenRotationError(e)

0 commit comments

Comments
 (0)