mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(backend): restore PyYAML cp38 hashes in poetry.lock and guard row truncation
- Re-add PyYAML cp38 wheel hashes dropped by local poetry lock on Python 3.13 (CI needs them for Python 3.11) - Truncate rows to header length before dict conversion to prevent None keys when data rows exceed header column count
This commit is contained in:
@@ -307,7 +307,10 @@ def _tabular_to_list_of_dicts(parsed: list) -> list[dict[str, Any]]:
|
||||
Ragged rows (fewer columns than the header) get None for missing values.
|
||||
"""
|
||||
header = parsed[0]
|
||||
return [dict(itertools.zip_longest(header, row)) for row in parsed[1:]]
|
||||
return [
|
||||
{col: (row[i] if i < len(row) else None) for i, col in enumerate(header)}
|
||||
for row in parsed[1:]
|
||||
]
|
||||
|
||||
|
||||
def _tabular_to_column_dict(parsed: list) -> dict[str, list]:
|
||||
|
||||
Reference in New Issue
Block a user