mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user