fix(python): return ValueError if passed unknown args to connect() (#1265)

It's confusing to users that keyword arguments from the async API like
`storage_options` are accepted by `connect()`, but don't do anything. We
should error if unknown arguments are passed instead.
This commit is contained in:
Will Jones
2024-05-03 17:00:08 -07:00
committed by GitHub
parent a7c0d80b9e
commit 82a1da554c

View File

@@ -107,6 +107,9 @@ def connect(
request_thread_pool=request_thread_pool,
**kwargs,
)
if kwargs:
raise ValueError(f"Unknown keyword arguments: {kwargs}")
return LanceDBConnection(uri, read_consistency_interval=read_consistency_interval)