Skip to content

Commit 63b95c1

Browse files
committed
lint fix
Signed-off-by: gitgud5000 <[email protected]>
1 parent 4c6ddb9 commit 63b95c1

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

kedro-datasets/kedro_datasets/ibis/table_dataset.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,17 @@ def __init__( # noqa: PLR0913
140140

141141
self._table_name = table_name
142142
self._database = database
143-
# Prefer credentials if provided, else fallback to connection
143+
# Prefer credentials if provided, else fallback to connection.
144+
# Ensure _connection_config is always a dict[str, Any] for type stability.
145+
self._connection_config: dict[str, Any]
144146
if credentials is not None:
145-
self._connection_config = credentials
147+
if isinstance(credentials, str):
148+
# Treat string credentials as a connection string under key 'con'
149+
self._connection_config = {"con": credentials}
150+
else:
151+
self._connection_config = deepcopy(credentials)
146152
else:
147-
self._connection_config = connection or self.DEFAULT_CONNECTION_CONFIG
153+
self._connection_config = deepcopy(connection or self.DEFAULT_CONNECTION_CONFIG)
148154
self.metadata = metadata
149155

150156
# Set load and save arguments, overwriting defaults if provided.

0 commit comments

Comments
 (0)