Skip to content

Commit 9e3bbb8

Browse files
committed
Add type hint to account for duckdb upgrade
1 parent e39d29a commit 9e3bbb8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

agentune/core/database.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,10 @@ def _mandatory_config_dict(self) -> dict[str, str]:
314314
'python_enable_replacements': 'False',
315315
}
316316

317-
def to_config_dict(self) -> dict[str, str]:
317+
def to_config_dict(self) -> dict[str, str | bool | int | float | list[str]]:
318+
"""The verbose return type avoids a type error when passing the dict to duckdb.connect().
319+
In practice, we return a dict containing only string values.
320+
"""
318321
set_fields = { k: str(v) for k, v
319322
in cattrs.Converter().unstructure_attrs_asdict(self).items()
320323
if v is not None and k != 'config' }

0 commit comments

Comments
 (0)