Skip to content

Commit 139fdd7

Browse files
authored
Update main version of kaggle.api (#734)
1 parent 20a6af5 commit 139fdd7

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/kaggle/api/kaggle_api.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def competition_download_leaderboard(self, id): # noqa: E501
4141
return self.api_client.competition_leaderboard_download(id, None)
4242

4343
def competition_view_leaderboard(self, id): # noqa: E501
44-
"""VIew competition leaderboard # noqa: E501.
44+
"""View competition leaderboard # noqa: E501.
4545
4646
:param str id: Competition name (required)
4747
:return: Result
@@ -86,8 +86,7 @@ def competitions_list(self,
8686
:param str sort_by: Sort the results
8787
:param int page: Page number
8888
:param str search: Search terms
89-
:return: Result If the method is called asynchronously, returns the
90-
request thread.
89+
:return: ApiListCompetitionsResponse
9190
"""
9291
return self.api_client.competitions_list(group, category, sort_by, page,
9392
search)
@@ -181,8 +180,7 @@ def datasets_create_version_by_id(self, id, dataset_new_version_request,
181180
:param int id: Dataset ID (required)
182181
:param DatasetNewVersionRequest dataset_new_version_request:
183182
Information for creating a new dataset version (required)
184-
:return: Result If the method is called asynchronously, returns the
185-
request thread.
183+
:return: throws NotImplementedError
186184
"""
187185
print("datasets_create_version_by_id() not implemented")
188186
print("use kaggle_api_extended.KaggleApi.dataset_create_version() instead")
@@ -215,8 +213,7 @@ def datasets_download_file(self,
215213
:param str dataset_slug: Dataset name (required)
216214
:param str file_name: File name (required)
217215
:param str dataset_version_number: Dataset version number
218-
:return: Result If the method is called asynchronously, returns the
219-
request thread.
216+
:return: True if the file was downloaded successfully, False otherwise
220217
"""
221218
dataset = f'{owner_slug}/{dataset_slug}'
222219
if dataset_version_number is not None:
@@ -249,8 +246,7 @@ def datasets_list(self,
249246
:param int page: Page number
250247
:param int max_size: Max Dataset Size (bytes)
251248
:param int min_size: Max Dataset Size (bytes)
252-
:return: Result If the method is called asynchronously, returns the
253-
request thread.
249+
:return: List of ApiDatasetFile.
254250
"""
255251
return self.api_client.dataset_list(
256252
sort_by=sort_by,
@@ -279,8 +275,7 @@ def delete_model(self, owner_slug, model_slug): # noqa: E501
279275
280276
:param str owner_slug: Model owner (required)
281277
:param str model_slug: Model name (required)
282-
:return: Result If the method is called asynchronously, returns the
283-
request thread.
278+
:return: ApiDeleteModelResponse
284279
"""
285280
return self.api_client.model_delete(f'{owner_slug}/{model_slug})')
286281

@@ -544,11 +539,16 @@ def models_list(self,
544539
search=None,
545540
owner=None,
546541
page_size=20,
547-
page_token=None): # noqa: E501
548-
"""Lists models # noqa: E501 :param str search: Search terms :param str
549-
sort_by: Sort the results :param str owner: Display models by a specific
550-
user or organization :param int page_size: Page size :param str page_token:
551-
Page token for pagination :return: Result."""
542+
page_token=None):
543+
"""List models
544+
545+
:param str search: Search terms
546+
:param str sort_by: Sort the results
547+
:param str owner: Display models by a specific user or organization
548+
:param int page_size: Page size
549+
:param str page_token: Page token for pagination
550+
:return: list of models
551+
"""
552552
return self.api_client.model_list(
553553
sort_by=sort_by,
554554
search=search,

0 commit comments

Comments
 (0)