Skip to content

Commit da98bd8

Browse files
committed
Rename internal method cell_contains_htmltoolslike to ui_must_be_processed
1 parent 46a1203 commit da98bd8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

shiny/render/_data_frame_utils/_html.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def maybe_as_cell_html(x: Jsonifiable, *, session: Session) -> Jsonifiable: ...
2929
def maybe_as_cell_html(
3030
x: Jsonifiable | TagNode, *, session: Session
3131
) -> Jsonifiable | CellHtml:
32-
if cell_contains_htmltoolslike(x):
32+
if ui_must_be_processed(x):
3333
return as_cell_html(x, session=session)
3434
return cast(Jsonifiable, x)
3535

@@ -53,20 +53,20 @@ def series_contains_htmltoolslike(ser: Series) -> bool:
5353
# Reprex:
5454
# pl.Series([{"y": 2}, {"x": 1}, None, HTML("<p>Hello</p>")]).dtype
5555
# #> Struct({'y': Int64})
56-
if cell_contains_htmltoolslike(val):
56+
if ui_must_be_processed(val):
5757
return True
5858
return False
5959

6060

6161
@overload
62-
def cell_contains_htmltoolslike( # pyright: ignore[reportOverlappingOverload]
62+
def ui_must_be_processed( # pyright: ignore[reportOverlappingOverload]
6363
val: str,
6464
) -> Literal[False]: ...
6565
@overload
66-
def cell_contains_htmltoolslike(
66+
def ui_must_be_processed(
6767
val: TagNode | object,
6868
) -> TypeIs[TagNode]: ...
69-
def cell_contains_htmltoolslike( # pyright: ignore[reportInconsistentOverload]
69+
def ui_must_be_processed( # pyright: ignore[reportInconsistentOverload]
7070
val: object,
7171
):
7272
if isinstance(val, str):

shiny/render/_data_frame_utils/_tbl_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from ..._typing_extensions import TypeIs
1010
from ...session import Session, require_active_session
1111
from ...types import Jsonifiable, JsonifiableDict
12-
from ._html import as_cell_html, cell_contains_htmltoolslike
12+
from ._html import as_cell_html, ui_must_be_processed
1313
from ._types import (
1414
CellPatch,
1515
CellValue,

0 commit comments

Comments
 (0)