Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor edits and code cleanup #609

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion temporalio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,7 @@ async def query(
"""Query the workflow.

This will query for :py:attr:`run_id` if present. To use a different
run ID, create a new handle with via
run ID, create a new handle with
:py:meth:`Client.get_workflow_handle`.

.. warning::
Expand Down
22 changes: 13 additions & 9 deletions temporalio/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,19 +184,23 @@ def _to_bridge_config(self) -> temporalio.bridge.client.ClientConfig:
target_url=target_url,
api_key=self.api_key,
tls_config=tls_config,
retry_config=self.retry_config._to_bridge_config()
if self.retry_config
else None,
keep_alive_config=self.keep_alive_config._to_bridge_config()
if self.keep_alive_config
else None,
retry_config=(
self.retry_config._to_bridge_config() if self.retry_config else None
),
keep_alive_config=(
self.keep_alive_config._to_bridge_config()
if self.keep_alive_config
else None
),
metadata=self.rpc_metadata,
identity=self.identity,
client_name="temporal-python",
client_version=__version__,
http_connect_proxy_config=self.http_connect_proxy_config._to_bridge_config()
if self.http_connect_proxy_config
else None,
http_connect_proxy_config=(
self.http_connect_proxy_config._to_bridge_config()
if self.http_connect_proxy_config
else None
),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not enforced by black but it is fairly standard to use parens to improve readability in this situation.

)


Expand Down
4 changes: 2 additions & 2 deletions tests/worker/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -3902,7 +3902,7 @@ def matches_metric_line(
return False
# Must have labels (don't escape for this test)
for k, v in at_least_labels.items():
if not f'{k}="{v}"' in line:
if f'{k}="{v}"' not in line:
return False
return line.endswith(f" {value}")

Expand Down Expand Up @@ -4856,7 +4856,7 @@ async def assert_scenario(
update_scenario: Optional[FailureTypesScenario] = None,
) -> None:
logging.debug(
f"Asserting scenario %s",
"Asserting scenario %s",
{
"workflow": workflow,
"expect_task_fail": expect_task_fail,
Expand Down
Loading