Skip to content

Commit 2d5ff41

Browse files
Imporve
1 parent 8b40aa4 commit 2d5ff41

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

slack_bolt/listener_matcher/builtins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def _check_event_subtype(event_payload: dict, constraints: dict) -> bool:
165165
return True
166166

167167

168-
def _verify_message_event_type(event_type: str) -> None:
168+
def _verify_message_event_type(event_type: Union[str, Pattern]) -> None:
169169
if isinstance(event_type, str) and event_type.startswith("message."):
170170
raise ValueError(error_message_event_type(event_type))
171171
if isinstance(event_type, Pattern) and "message\\." in event_type.pattern:
@@ -320,7 +320,7 @@ def _block_action(
320320
elif isinstance(constraints, dict):
321321
# block_id matching is optional
322322
block_id: Optional[Union[str, Pattern]] = constraints.get("block_id")
323-
action_id = constraints.get("action_id")
323+
action_id = constraints.get("action_id") # type: ignore[assignment]
324324
if block_id is None and action_id is None:
325325
return False
326326
block_id_matched = block_id is None or _matches(block_id, action.get("block_id")) # type: ignore[union-attr]

slack_bolt/logger/messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def error_authorize_conflicts() -> str:
6060
return "`authorize` in the top-level arguments is not allowed when you pass either `oauth_settings` or `oauth_flow`"
6161

6262

63-
def error_message_event_type(event_type: str) -> str:
63+
def error_message_event_type(event_type: Union[str, Pattern]) -> str:
6464
return (
6565
f'Although the document mentions "{event_type}", '
6666
'it is not a valid event type. Use "message" instead. '

0 commit comments

Comments
 (0)