Skip to content

Commit 68233de

Browse files
committed
Remove .update() method
Since .stream() has clear=True, it doesn't really serve any purpose
1 parent 7cf0366 commit 68233de

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

shiny/api-examples/MarkdownStream/app-core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def server(input, output, session):
1919
# Generate words from the README.md file (with a small delay)
2020
def chunk_generator():
2121
for chunk in readme_chunks:
22-
time.sleep(0.05)
22+
time.sleep(0.02)
2323
yield chunk + " "
2424

2525
md = ui.MarkdownStream("shiny-readme")

shiny/api-examples/MarkdownStream/app-express.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
def chunk_generator():
1616
for chunk in readme_chunks:
1717
if not session.is_stub_session():
18-
time.sleep(0.05)
18+
time.sleep(0.02)
1919
yield chunk + " "
2020

2121

shiny/ui/_markdown_stream.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
"MarkdownStream",
1414
)
1515

16-
StreamingContentType = Literal["markdown", "semi-markdown", "html", "text"]
16+
StreamingContentType = Literal[
17+
"markdown",
18+
"semi-markdown",
19+
"html",
20+
"text",
21+
]
1722

1823

1924
class ContentMessage(TypedDict):
@@ -66,7 +71,7 @@ def ui(self) -> Tag:
6671
"""
6772
Get the UI element for this markdown stream.
6873
69-
This method is only relevant fpr Shiny Express. In Shiny Core, use
74+
This method is only relevant for Shiny Express. In Shiny Core, use
7075
:func:`~shiny.ui.output_markdown_stream` for placing the markdown stream
7176
in the UI.
7277
@@ -97,9 +102,6 @@ async def _task():
97102

98103
_task()
99104

100-
def update(self, content: str):
101-
self._replace(content)
102-
103105
def _append(self, content: str):
104106
msg: ContentMessage = {
105107
"id": self.id,

0 commit comments

Comments
 (0)