Skip to content

Commit 8674079

Browse files
committed
Hide variable that shouldn't be exposed
1 parent 5ddb193 commit 8674079

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

shiny/bookmark/_save_state.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class BookmarkState:
2222
input: Inputs
2323
values: dict[str, Any]
2424
exclude: list[str]
25-
# _bookmark_: A special value that is always excluded from the bookmark.
26-
on_save: (
25+
26+
_on_save: (
2727
Callable[["BookmarkState"], Awaitable[None]] | None
2828
) # A callback to invoke during the saving process.
2929

@@ -39,7 +39,7 @@ def __init__(
3939
):
4040
self.input = input
4141
self.exclude = exclude
42-
self.on_save = on_save
42+
self._on_save = on_save
4343
self.dir = None # This will be set by external functions.
4444
self.values = {}
4545

@@ -48,9 +48,9 @@ def __init__(
4848
async def _call_on_save(self):
4949
# Allow user-supplied save function to do things like add state$values, or
5050
# save data to state dir.
51-
if self.on_save:
51+
if self._on_save:
5252
with isolate():
53-
await self.on_save(self)
53+
await self._on_save(self)
5454

5555
async def _save_state(self, *, app: App) -> str:
5656
"""

0 commit comments

Comments
 (0)