Skip to content

Commit

Permalink
fix: retry_on_conflicts is not bool
Browse files Browse the repository at this point in the history
  • Loading branch information
pattrickrice authored and dblock committed Aug 15, 2024
1 parent 19a9113 commit a1b3cfe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion opensearchpy/_async/helpers/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ async def update(
detect_noop: Optional[bool] = True,
doc_as_upsert: Optional[bool] = False,
refresh: Optional[bool] = False,
retry_on_conflict: Optional[bool] = None,
retry_on_conflict: Optional[int] = None,
script: Any = None,
script_id: Optional[str] = None,
scripted_upsert: Optional[bool] = False,
Expand Down
2 changes: 1 addition & 1 deletion opensearchpy/helpers/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def update(
detect_noop: bool = True,
doc_as_upsert: bool = False,
refresh: bool = False,
retry_on_conflict: Any = None,
retry_on_conflict: int = None,
script: Any = None,
script_id: Any = None,
scripted_upsert: bool = False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ async def test_update_retry_on_conflict(write_client: Any) -> None:

@pytest.mark.parametrize("retry_on_conflict", [None, 0]) # type: ignore
async def test_update_conflicting_version(
write_client: Any, retry_on_conflict: bool
write_client: Any, retry_on_conflict: int
) -> None:
await Wiki.init()
w = Wiki(owner=User(name="Honza Kral"), _id="opensearch-py", views=42)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def test_update_retry_on_conflict(write_client: Any) -> None:


@pytest.mark.parametrize("retry_on_conflict", [None, 0]) # type: ignore
def test_update_conflicting_version(write_client: Any, retry_on_conflict: Any) -> None:
def test_update_conflicting_version(write_client: Any, retry_on_conflict: int) -> None:
Wiki.init()
w = Wiki(owner=User(name="Honza Kral"), _id="opensearch-py", views=42)
w.save()
Expand Down

0 comments on commit a1b3cfe

Please sign in to comment.