fix(backend): fix pyright type errors in tabular helper signatures

Widen parameter type from list[list] to list so pyright doesn't complain
about Any not being assignable to list[list] after _is_tabular() guard.
This commit is contained in:
Zamil Majdy
2026-03-13 16:04:06 +07:00
parent e47ab6a295
commit 04bb0bef69

View File

@@ -301,7 +301,7 @@ def _is_tabular(parsed: Any) -> bool:
)
def _tabular_to_list_of_dicts(parsed: list[list]) -> list[dict[str, Any]]:
def _tabular_to_list_of_dicts(parsed: list) -> list[dict[str, Any]]:
"""Convert [[header], [row1], ...] → [{header[0]: row[0], ...}, ...]."""
header = parsed[0]
return [
@@ -310,7 +310,7 @@ def _tabular_to_list_of_dicts(parsed: list[list]) -> list[dict[str, Any]]:
]
def _tabular_to_column_dict(parsed: list[list]) -> dict[str, list]:
def _tabular_to_column_dict(parsed: list) -> dict[str, list]:
"""Convert [[header], [row1], ...] → {"col1": [val1, ...], ...}."""
header = parsed[0]
return {