@@ -77,7 +77,7 @@ async def append(
7777 self ,
7878 * ,
7979 markdown_text : Optional [str ] = None ,
80- chunks : Optional [Sequence [Chunk ]] = None ,
80+ chunks : Optional [Sequence [Union [ Dict , Chunk ] ]] = None ,
8181 ** kwargs ,
8282 ) -> Optional [AsyncSlackResponse ]:
8383 """Append to the stream.
@@ -133,7 +133,7 @@ async def stop(
133133 self ,
134134 * ,
135135 markdown_text : Optional [str ] = None ,
136- chunks : Optional [Sequence [Chunk ]] = None ,
136+ chunks : Optional [Sequence [Union [ Dict , Chunk ] ]] = None ,
137137 blocks : Optional [Union [str , Sequence [Union [Dict , Block ]]]] = None ,
138138 metadata : Optional [Union [Dict , Metadata ]] = None ,
139139 ** kwargs ,
@@ -183,7 +183,7 @@ async def stop(
183183 raise e .SlackRequestError ("Failed to stop stream: stream not started" )
184184 self ._stream_ts = str (response ["ts" ])
185185 self ._state = "in_progress"
186- flushings : List [Chunk ] = []
186+ flushings : List [Union [ Dict , Chunk ] ] = []
187187 if len (self ._buffer ) != 0 :
188188 flushings .append (MarkdownTextChunk (text = self ._buffer ))
189189 if chunks is not None :
@@ -200,9 +200,9 @@ async def stop(
200200 self ._state = "completed"
201201 return response
202202
203- async def _flush_buffer (self , chunks : Optional [Sequence [Chunk ]] = None , ** kwargs ) -> AsyncSlackResponse :
203+ async def _flush_buffer (self , chunks : Optional [Sequence [Union [ Dict , Chunk ] ]] = None , ** kwargs ) -> AsyncSlackResponse :
204204 """Flush the internal buffer with chunks by making appropriate API calls."""
205- flushings : List [Chunk ] = []
205+ flushings : List [Union [ Dict , Chunk ] ] = []
206206 if len (self ._buffer ) != 0 :
207207 flushings .append (MarkdownTextChunk (text = self ._buffer ))
208208 if chunks is not None :
0 commit comments