Skip to content

Commit 8e7b427

Browse files
committed
fix: resolve mypy errors in table.py type annotations
1 parent 6702bf9 commit 8e7b427

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

marimo/_plugins/ui/_impl/table.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
cast,
1313
)
1414

15+
if TYPE_CHECKING:
16+
from collections.abc import Mapping
17+
1518
from narwhals.typing import IntoDataFrame
1619

1720
import marimo._output.data.data as mo_data
@@ -220,11 +223,11 @@ def get_default_table_max_columns() -> int:
220223

221224
def _filter_valid_columns(
222225
group: FilterGroup,
223-
column_dtypes: dict[str, str],
226+
column_dtypes: Mapping[str, str],
224227
) -> FilterGroup:
225228
"""Recursively remove conditions on non-existent columns
226229
or with invalid operators for the column dtype."""
227-
valid_children = []
230+
valid_children: list[FilterCondition | FilterGroup] = []
228231
for child in group.children:
229232
if isinstance(child, FilterCondition):
230233
if child.column_id not in column_dtypes:

0 commit comments

Comments
 (0)