diff --git a/slack_sdk/models/blocks/block_elements.py b/slack_sdk/models/blocks/block_elements.py index be683162..85a9742e 100644 --- a/slack_sdk/models/blocks/block_elements.py +++ b/slack_sdk/models/blocks/block_elements.py @@ -1668,7 +1668,6 @@ def attributes(self) -> Set[str]: # type: ignore[override] { "url", "text", - "icon_url", } ) @@ -1677,7 +1676,6 @@ def __init__( *, url: str, text: str, - icon_url: Optional[str] = None, **others: Dict, ): """ @@ -1687,13 +1685,11 @@ def __init__( Args: url (required): The URL type source. text (required): Display text for the URL. - icon_url: Optional icon URL to display with the source. """ super().__init__(type=self.type) show_unknown_key_warning(self, others) self.url = url self.text = text - self.icon_url = icon_url # ------------------------------------------------- diff --git a/slack_sdk/web/chat_stream.py b/slack_sdk/web/chat_stream.py index 580f7cac..575aed8c 100644 --- a/slack_sdk/web/chat_stream.py +++ b/slack_sdk/web/chat_stream.py @@ -196,17 +196,17 @@ def stop( def _flush_buffer(self, chunks: Optional[Sequence[Union[Dict, Chunk]]] = None, **kwargs) -> SlackResponse: """Flush the internal buffer with chunks by making appropriate API calls.""" - flushings: List[Union[Dict, Chunk]] = [] + chunks_to_flush: List[Union[Dict, Chunk]] = [] if len(self._buffer) != 0: - flushings.append(MarkdownTextChunk(text=self._buffer)) + chunks_to_flush.append(MarkdownTextChunk(text=self._buffer)) if chunks is not None: - flushings.extend(chunks) + chunks_to_flush.extend(chunks) if not self._stream_ts: response = self._client.chat_startStream( **self._stream_args, token=self._token, **kwargs, - chunks=flushings, + chunks=chunks_to_flush, ) self._stream_ts = response.get("ts") self._state = "in_progress" @@ -216,7 +216,7 @@ def _flush_buffer(self, chunks: Optional[Sequence[Union[Dict, Chunk]]] = None, * channel=self._stream_args["channel"], ts=self._stream_ts, **kwargs, - chunks=flushings, + chunks=chunks_to_flush, ) self._buffer = "" return response diff --git a/tests/slack_sdk/models/test_chunks.py b/tests/slack_sdk/models/test_chunks.py index 293f5acb..78845b30 100644 --- a/tests/slack_sdk/models/test_chunks.py +++ b/tests/slack_sdk/models/test_chunks.py @@ -66,7 +66,6 @@ def test_json(self): UrlSourceElement( text="The Free Encyclopedia", url="https://wikipedia.org", - icon_url="https://example.com/globe.png", ), ], ).to_dict(), @@ -86,7 +85,6 @@ def test_json(self): "type": "url", "text": "The Free Encyclopedia", "url": "https://wikipedia.org", - "icon_url": "https://example.com/globe.png", }, ], },