Skip to content

Commit c784fe8

Browse files
committed
Add on_error
1 parent 85897bf commit c784fe8

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pinecone/data/features/bulk_import.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def __init__(self, **kwargs):
5050
)
5151

5252
@prerelease_feature
53-
def start_import(self, uri: str, integration: Optional[str] = None) -> StartImportResponse:
53+
def start_import(self, uri: str, integration: Optional[str] = None, on_error=Optional[str]) -> StartImportResponse:
5454
"""Import data from a URI into an index.
5555
5656
Examples:
@@ -69,6 +69,7 @@ def start_import(self, uri: str, integration: Optional[str] = None) -> StartImpo
6969
[
7070
("uri", uri),
7171
("integration", integration),
72+
("on_error", on_error),
7273
]
7374
)
7475
return self.__import_operations_api.start_import(StartImportRequest(**args_dict))

tests/unit/data/test_bulk_import.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import pytest
22
import warnings
33

4-
from urllib3 import BaseHTTPResponse, HTTPResponse
5-
6-
from datetime import datetime, date
4+
from urllib3 import BaseHTTPResponse
75

86
from pinecone.core_ea.openapi.db_data.api.bulk_operations_api import BulkOperationsApi
97
from pinecone.core_ea.openapi.db_data.models import ImportModel, StartImportResponse
@@ -83,6 +81,6 @@ def test_no_arguments(self, mocker):
8381

8482
with pytest.warns(UserWarning, match="prerelease"):
8583
with pytest.raises(TypeError) as e:
86-
my_import = client.start_import()
84+
client.start_import()
8785

8886
assert "missing 1 required positional argument" in str(e.value)

0 commit comments

Comments
 (0)