aboutsummaryrefslogtreecommitdiffstats
path: root/typings/slack_api/slack_users_info.pyi
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-01-15 18:04:51 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:53 +0100
commitce70ee11a3e49b14a3943ca1f2eda250dc49b989 (patch)
tree7ceb7b4e1b14aa4ef48f31dfb09ec95d23c64169 /typings/slack_api/slack_users_info.pyi
parent51299ef5b42b75794096c4ecc10bc101dca2d400 (diff)
downloadwee-slack-ce70ee11a3e49b14a3943ca1f2eda250dc49b989.tar.gz
Combine error response types
Diffstat (limited to 'typings/slack_api/slack_users_info.pyi')
-rw-r--r--typings/slack_api/slack_users_info.pyi14
1 files changed, 4 insertions, 10 deletions
diff --git a/typings/slack_api/slack_users_info.pyi b/typings/slack_api/slack_users_info.pyi
index e07353b..086dbb4 100644
--- a/typings/slack_api/slack_users_info.pyi
+++ b/typings/slack_api/slack_users_info.pyi
@@ -2,6 +2,7 @@ from __future__ import annotations
from typing import Dict, Generic, List, Literal, Optional, TypedDict, TypeVar, final
+from slack_api.slack_error import SlackErrorResponse
from typing_extensions import NotRequired
T = TypeVar("T")
@@ -106,21 +107,14 @@ class SlackUserInfoBot(SlackUserInfoCommon):
SlackUserInfo = SlackUserInfoPerson | SlackUserInfoBot
@final
-class SlackUserInfoErrorResponse(TypedDict):
- ok: Literal[False]
- error: str
-
-@final
class SlackUserInfoSuccessResponse(TypedDict, Generic[T]):
ok: Literal[True]
user: T
SlackUserInfoPersonResponse = (
- SlackUserInfoSuccessResponse[SlackUserInfoPerson] | SlackUserInfoErrorResponse
+ SlackUserInfoSuccessResponse[SlackUserInfoPerson] | SlackErrorResponse
)
SlackUserInfoBotResponse = (
- SlackUserInfoSuccessResponse[SlackUserInfoBot] | SlackUserInfoErrorResponse
-)
-SlackUserInfoResponse = (
- SlackUserInfoSuccessResponse[SlackUserInfo] | SlackUserInfoErrorResponse
+ SlackUserInfoSuccessResponse[SlackUserInfoBot] | SlackErrorResponse
)
+SlackUserInfoResponse = SlackUserInfoSuccessResponse[SlackUserInfo] | SlackErrorResponse