Skip to content

Commit 5302f90

Browse files
committed
lints
1 parent a50860e commit 5302f90

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from starlette.requests import Request
22

3-
from shiny import App, Inputs, Outputs, Session, reactive, render, ui
3+
from shiny import App, Inputs, Outputs, Session, ui
44

55

66
# App UI **must** be a function to ensure that each user restores their own UI values.

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
from starlette.requests import Request
2-
3-
from shiny import reactive, render
4-
from shiny.express import app_opts, input, session, ui
1+
from shiny.express import app_opts, session, ui
52

63
app_opts(bookmark_store="url")
74

shiny/api-examples/restore_input/app.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
from htmltools import tags
22
from starlette.requests import Request
33

4-
from shiny import App, Inputs, Outputs, Session, reactive, render, ui
5-
from shiny._namespaces import resolve_id
4+
from shiny import App, Inputs, Outputs, Session, ui
5+
from shiny.bookmark import restore_input
6+
from shiny.module import resolve_id
67

78

89
def custom_input_text(
910
id: str,
1011
value: str = "",
11-
) -> Tag:
12+
) -> ui.Tag:
1213

1314
resolved_id = resolve_id(id)
1415
return tags.div(
1516
"Custom input text:",
1617
tags.input(
17-
id=resolve_id(id),
18+
id=resolved_id,
1819
type="text",
19-
value=value,
20+
value=restore_input(resolved_id, value),
2021
placeholder="Type here...",
2122
),
2223
class_="shiny-input-container",
23-
style=css(width=width),
24+
style=ui.css(width="400px"),
2425
)
2526

2627

tests/playwright/shiny/bookmark/modules/app-express.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from shiny import Inputs, Outputs, Session, reactive, render
55
from shiny.bookmark import BookmarkState
66
from shiny.bookmark._restore_state import RestoreState
7-
from shiny.express import app_opts, input, module, session, ui
7+
from shiny.express import app_opts, module, session, ui
88

99
SHINY_BOOKMARK_STORE: Literal["url", "server"] = os.getenv(
1010
"SHINY_BOOKMARK_STORE", "url"

0 commit comments

Comments
 (0)