Skip to content

Commit 732b325

Browse files
Merge remote-tracking branch 'origin/feat-ai-apps-thinking-steps' into thinking-steps-docs-polish
2 parents fb1c49a + 83bc1e8 commit 732b325

File tree

6 files changed

+10
-22
lines changed

6 files changed

+10
-22
lines changed

slack_sdk/models/blocks/block_elements.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,6 @@ def attributes(self) -> Set[str]: # type: ignore[override]
16681668
{
16691669
"url",
16701670
"text",
1671-
"icon_url",
16721671
}
16731672
)
16741673

@@ -1677,7 +1676,6 @@ def __init__(
16771676
*,
16781677
url: str,
16791678
text: str,
1680-
icon_url: Optional[str] = None,
16811679
**others: Dict,
16821680
):
16831681
"""
@@ -1687,13 +1685,11 @@ def __init__(
16871685
Args:
16881686
url (required): The URL type source.
16891687
text (required): Display text for the URL.
1690-
icon_url: Optional icon URL to display with the source.
16911688
"""
16921689
super().__init__(type=self.type)
16931690
show_unknown_key_warning(self, others)
16941691
self.url = url
16951692
self.text = text
1696-
self.icon_url = icon_url
16971693

16981694

16991695
# -------------------------------------------------

slack_sdk/models/blocks/blocks.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,6 @@ class PlanBlock(Block):
849849
def attributes(self) -> Set[str]: # type: ignore[override]
850850
return super().attributes.union(
851851
{
852-
"plan_id",
853852
"title",
854853
"tasks",
855854
}
@@ -858,7 +857,6 @@ def attributes(self) -> Set[str]: # type: ignore[override]
858857
def __init__(
859858
self,
860859
*,
861-
plan_id: str,
862860
title: str,
863861
tasks: Optional[Sequence[Union[Dict, TaskCardBlock]]] = None,
864862
block_id: Optional[str] = None,
@@ -872,14 +870,11 @@ def __init__(
872870
Maximum length for this field is 255 characters.
873871
block_id should be unique for each message and each iteration of a message.
874872
If a message is updated, use a new block_id.
875-
plan_id (required): ID for the plan (May be removed / made optional, feel free to pass in a random UUID
876-
for now)
877873
title (required): Title of the plan in plain text
878874
tasks: Details of the task in the form of a single "rich_text" entity.
879875
"""
880876
super().__init__(type=self.type, block_id=block_id)
881877
show_unknown_key_warning(self, others)
882878

883-
self.plan_id = plan_id
884879
self.title = title
885880
self.tasks = tasks

slack_sdk/web/async_chat_stream.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,17 +206,17 @@ async def stop(
206206

207207
async def _flush_buffer(self, chunks: Optional[Sequence[Union[Dict, Chunk]]] = None, **kwargs) -> AsyncSlackResponse:
208208
"""Flush the internal buffer with chunks by making appropriate API calls."""
209-
flushings: List[Union[Dict, Chunk]] = []
209+
chunks_to_flush: List[Union[Dict, Chunk]] = []
210210
if len(self._buffer) != 0:
211-
flushings.append(MarkdownTextChunk(text=self._buffer))
211+
chunks_to_flush.append(MarkdownTextChunk(text=self._buffer))
212212
if chunks is not None:
213-
flushings.extend(chunks)
213+
chunks_to_flush.extend(chunks)
214214
if not self._stream_ts:
215215
response = await self._client.chat_startStream(
216216
**self._stream_args,
217217
token=self._token,
218218
**kwargs,
219-
chunks=flushings,
219+
chunks=chunks_to_flush,
220220
)
221221
self._stream_ts = response.get("ts")
222222
self._state = "in_progress"
@@ -226,7 +226,7 @@ async def _flush_buffer(self, chunks: Optional[Sequence[Union[Dict, Chunk]]] = N
226226
channel=self._stream_args["channel"],
227227
ts=self._stream_ts,
228228
**kwargs,
229-
chunks=flushings,
229+
chunks=chunks_to_flush,
230230
)
231231
self._buffer = ""
232232
return response

slack_sdk/web/chat_stream.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,17 +196,17 @@ def stop(
196196

197197
def _flush_buffer(self, chunks: Optional[Sequence[Union[Dict, Chunk]]] = None, **kwargs) -> SlackResponse:
198198
"""Flush the internal buffer with chunks by making appropriate API calls."""
199-
flushings: List[Union[Dict, Chunk]] = []
199+
chunks_to_flush: List[Union[Dict, Chunk]] = []
200200
if len(self._buffer) != 0:
201-
flushings.append(MarkdownTextChunk(text=self._buffer))
201+
chunks_to_flush.append(MarkdownTextChunk(text=self._buffer))
202202
if chunks is not None:
203-
flushings.extend(chunks)
203+
chunks_to_flush.extend(chunks)
204204
if not self._stream_ts:
205205
response = self._client.chat_startStream(
206206
**self._stream_args,
207207
token=self._token,
208208
**kwargs,
209-
chunks=flushings,
209+
chunks=chunks_to_flush,
210210
)
211211
self._stream_ts = response.get("ts")
212212
self._state = "in_progress"
@@ -216,7 +216,7 @@ def _flush_buffer(self, chunks: Optional[Sequence[Union[Dict, Chunk]]] = None, *
216216
channel=self._stream_args["channel"],
217217
ts=self._stream_ts,
218218
**kwargs,
219-
chunks=flushings,
219+
chunks=chunks_to_flush,
220220
)
221221
self._buffer = ""
222222
return response

tests/slack_sdk/models/test_blocks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,6 @@ class PlanBlockTests(unittest.TestCase):
901901
def test_document(self):
902902
input = {
903903
"type": "plan",
904-
"plan_id": "plan_1",
905904
"title": "Thinking completed",
906905
"tasks": [
907906
{

tests/slack_sdk/models/test_chunks.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ def test_json(self):
6666
UrlSourceElement(
6767
text="The Free Encyclopedia",
6868
url="https://wikipedia.org",
69-
icon_url="https://example.com/globe.png",
7069
),
7170
],
7271
).to_dict(),
@@ -86,7 +85,6 @@ def test_json(self):
8685
"type": "url",
8786
"text": "The Free Encyclopedia",
8887
"url": "https://wikipedia.org",
89-
"icon_url": "https://example.com/globe.png",
9088
},
9189
],
9290
},

0 commit comments

Comments
 (0)