Skip to content

Commit

Permalink
PR comment fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cretz committed Jun 10, 2022
1 parent 4a10595 commit 411d1df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions temporalio/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,9 @@ def random() -> Random:
def upsert_search_attributes(attributes: temporalio.common.SearchAttributes) -> None:
"""Upsert search attributes for this workflow.
The keys will be added/replaced on top of the existing search attributes in
the same manner as :py:meth:`dict.update`. :py:attr:`Info.search_attributes`
will also be updated with these values.
The keys will be added or replaced on top of the existing search attributes
in the same manner as :py:meth:`dict.update`.
:py:attr:`Info.search_attributes` will also be updated with these values.
Technically an existing search attribute cannot be deleted, but an empty
list can be provided for the values which is effectively the same thing.
Expand Down
2 changes: 1 addition & 1 deletion tests/worker/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,11 +1197,11 @@ async def test_workflow_search_attributes(server: ExternalServer, client: Client
if not server.supports_custom_search_attributes:
pytest.skip("Custom search attributes not supported")

# Add search attributes if not already present
async def search_attributes_present() -> bool:
resp = await client.service.get_search_attributes(GetSearchAttributesRequest())
return any(k for k in resp.keys.keys() if k.startswith(sa_prefix))

# Add search attributes if not already present
if not await search_attributes_present():
async with grpc.aio.insecure_channel(server.host_port) as channel:
stub = OperatorServiceStub(channel)
Expand Down

0 comments on commit 411d1df

Please sign in to comment.