Skip to content

Commit 9163aa3

Browse files
committed
fix typehint
1 parent 61dd287 commit 9163aa3

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

kbcstorage/workspaces.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from kbcstorage.base import Endpoint
1010
from kbcstorage.files import Files
1111
from kbcstorage.jobs import Jobs
12-
12+
from typing import List # the legacy Workspaces class below unfortunately defines its own method called list
1313

1414
def _make_body(mapping, source_key='source'):
1515
"""
@@ -135,17 +135,18 @@ def set_public_key(self, workspace_id, public_key):
135135
url = '{}/{}/public-key'.format(self.base_url, workspace_id)
136136
return self._post(url, json=data)
137137

138-
def load_tables(self, workspace_id: int | str, table_mapping: dict | list[dict], preserve=True, load_type='load'):
138+
def load_tables(self, workspace_id: int | str, table_mapping: dict | List[dict], preserve=True, load_type='load'):
139139
"""
140140
Load tabes from storage into a workspace.
141141
142142
Args:
143143
workspace_id (int or str): The id of the workspace to which to load
144144
the tables.
145-
table_mapping (:obj:`dict`): Source table names mapped to
146-
destination table names.
145+
table_mapping (:obj:`dict` or :obj:`list`): Source table names mapped to
146+
destination table names. or a list of dicts with detailed tables specification.
147147
preserve (bool): If False, drop tables, else keep tables in
148148
workspace.
149+
load_type (str): Type of load, either 'load' or 'load-clone'. Defaults to 'load'.
149150
150151
Raises:
151152
requests.HTTPError: If the API request fails.

0 commit comments

Comments
 (0)