Skip to content

Commit 1f46fb3

Browse files
committed
Un-export render.[DataFrame, DataFrameT, IntoDataFrame, IntoDataFrameT] as they are direct exports from narwhals
1 parent 1fcef38 commit 1f46fb3

File tree

6 files changed

+12
-11
lines changed

6 files changed

+12
-11
lines changed

shiny/render/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
from ._data_frame_utils._selection import CellSelection
1616
from ._data_frame_utils._types import ( # noqa: F401
1717
StyleInfo,
18-
DataFrame, # pyright: ignore[reportUnusedImport]
19-
DataFrameT, # pyright: ignore[reportUnusedImport]
20-
IntoDataFrame, # pyright: ignore[reportUnusedImport]
21-
IntoDataFrameT, # pyright: ignore[reportUnusedImport]
2218
)
2319
from ._deprecated import ( # noqa: F401
2420
RenderFunction, # pyright: ignore[reportUnusedImport]

tests/playwright/shiny/components/data_frame/data_view_info/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# pyright: reportArgumentType = false
66
# pyright: reportUnknownMemberType = false
77
import polars as pl
8+
from narwhals.typing import IntoDataFrame
89
from palmerpenguins import load_penguins_raw
910

1011
from shiny import App, Inputs, Outputs, Session, module, render, ui
@@ -55,7 +56,7 @@ def mod_server(
5556
input: Inputs,
5657
output: Outputs,
5758
session: Session,
58-
dt: render.IntoDataFrame,
59+
dt: IntoDataFrame,
5960
):
6061
@render.data_frame
6162
def penguins_df():

tests/playwright/shiny/components/data_frame/df_methods/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pandas as pd
22
import polars as pl
33
import seaborn as sns
4+
from narwhals.typing import IntoDataFrame
45

56
from shiny import App, Inputs, Outputs, Session, module, reactive, render, ui
67

@@ -45,7 +46,7 @@ def mod_server(
4546
input: Inputs,
4647
output: Outputs,
4748
session: Session,
48-
data: render.IntoDataFrame,
49+
data: IntoDataFrame,
4950
):
5051
@render.text
5152
def df_type():

tests/playwright/shiny/components/data_frame/row_selection/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import palmerpenguins # pyright: ignore[reportMissingTypeStubs]
44
import polars as pl
5+
from narwhals.typing import IntoDataFrame
56

67
from shiny import App, Inputs, Outputs, Session, module, reactive, render, ui
78

@@ -41,7 +42,7 @@ def make_ui(title: str):
4142
)
4243

4344

44-
def make_server(input: Inputs, data: render.IntoDataFrame):
45+
def make_server(input: Inputs, data: IntoDataFrame):
4546
@render.data_frame
4647
def grid():
4748
return render.DataGrid(
@@ -93,7 +94,7 @@ def mod_server(
9394
input: Inputs,
9495
output: Outputs,
9596
session: Session,
96-
data: render.IntoDataFrame,
97+
data: IntoDataFrame,
9798
):
9899
make_server(input, data)
99100

tests/playwright/shiny/components/data_frame/styles/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# pyright: reportMissingTypeStubs = false
66
import palmerpenguins
77
import polars as pl
8+
from narwhals.typing import IntoDataFrame
89

910
from shiny import App, Inputs, Outputs, Session, module, render, ui
1011

@@ -110,15 +111,15 @@ def mod_server(
110111
input: Inputs,
111112
output: Outputs,
112113
session: Session,
113-
data: render.IntoDataFrame,
114+
data: IntoDataFrame,
114115
):
115116
@render.data_frame
116117
def fn_styles():
117118

118119
counter = 0
119120

120121
def df_styles_fn(
121-
data: render.IntoDataFrame,
122+
data: IntoDataFrame,
122123
) -> list[render.StyleInfo]:
123124
nonlocal counter
124125

tests/playwright/shiny/components/data_frame/validate_column_labels/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import palmerpenguins # pyright: ignore[reportMissingTypeStubs]
66
import polars as pl
7+
from narwhals.typing import IntoDataFrame
78

89
from shiny import Inputs, Outputs, Session
910
from shiny.express import module, render, ui
@@ -22,7 +23,7 @@ def df_mod(
2223
output: Outputs,
2324
session: Session,
2425
name: str,
25-
data: render.IntoDataFrame,
26+
data: IntoDataFrame,
2627
):
2728

2829
ui.hr()

0 commit comments

Comments
 (0)