@@ -216,7 +216,7 @@ async def _api_call(
216216 response = await client .post (endpoint , json = params )
217217
218218 response .raise_for_status ()
219- data = response .json ()
219+ data : dict [ str , Any ] = response .json ()
220220
221221 if not data .get ("ok" ):
222222 error = data .get ("error" , "unknown_error" )
@@ -331,7 +331,7 @@ async def _search_messages(
331331 )
332332
333333 if data .get ("ok" ):
334- matches = data .get ("messages" , {}).get ("matches" , [])
334+ matches : list [ dict [ str , Any ]] = data .get ("messages" , {}).get ("matches" , [])
335335 if matches :
336336 logger .debug (f"Found { len (matches )} messages via search API" )
337337 return matches
@@ -432,7 +432,8 @@ async def _fetch_thread(
432432 if not data .get ("ok" ):
433433 return []
434434
435- return data .get ("messages" , [])
435+ messages : list [dict [str , Any ]] = data .get ("messages" , [])
436+ return messages
436437
437438 def _parse_message (
438439 self ,
@@ -626,9 +627,11 @@ async def fetch_task_context(
626627 if thread_msgs :
627628 # Resolve user names for thread participants
628629 for thread_msg in thread_msgs :
629- user_id = thread_msg .get ("user" )
630- if user_id and user_id not in user_names :
631- user_names [user_id ] = await self ._resolve_user_name (user_id )
630+ thread_user_id : str | None = thread_msg .get ("user" )
631+ if thread_user_id and thread_user_id not in user_names :
632+ user_names [thread_user_id ] = await self ._resolve_user_name (
633+ thread_user_id
634+ )
632635
633636 parent = self ._parse_message (
634637 thread_msgs [0 ], channel_id , channel_name , user_names
0 commit comments