Skip to content

Commit b658fb8

Browse files
committed
Use kwarg name
1 parent 154f95f commit b658fb8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pinecone/db_control/resources/sync/index.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,10 @@ def delete(self, *, name: str, timeout: Optional[int] = None):
172172
return
173173

174174
if timeout is None:
175-
while self.has(name):
175+
while self.has(name=name):
176176
time.sleep(5)
177177
else:
178-
while self.has(name) and timeout >= 0:
178+
while self.has(name=name) and timeout >= 0:
179179
time.sleep(5)
180180
timeout -= 5
181181
if timeout and timeout < 0:

tests/integration/control/resources/index/test_has.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ class TestHasIndex:
55
def test_index_exists_success(self, pc, create_index_params):
66
name = create_index_params["name"]
77
pc.db.index.create(**create_index_params)
8-
has_index = pc.db.index.has(name)
8+
has_index = pc.db.index.has(name=name)
99
assert has_index == True
1010

1111
def test_index_does_not_exist(self, pc):
1212
name = random_string(8)
13-
has_index = pc.db.index.has(name)
13+
has_index = pc.db.index.has(name=name)
1414
assert has_index == False
1515

1616
def test_has_index_with_null_index_name(self, pc):
17-
has_index = pc.db.index.has("")
17+
has_index = pc.db.index.has(name="")
1818
assert has_index == False

0 commit comments

Comments
 (0)