Skip to content

Commit 28c04b0

Browse files
YunchuWangCopilot
andcommitted
Remove duplicate sandbox normalization helper
Reuse the internal declaration normalization helper from the on-demand sandbox management client instead of keeping a duplicate copy in client.py. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent cd6994e commit 28c04b0

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

  • durabletask-azuremanaged/durabletask/azuremanaged/preview/on_demand_sandbox

durabletask-azuremanaged/durabletask/azuremanaged/preview/on_demand_sandbox/client.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from durabletask.azuremanaged.preview.on_demand_sandbox.declarations import (
1010
_build_profile_on_demand_sandbox_activity_declarations,
11+
_normalize_required,
1112
)
1213
from durabletask.azuremanaged.preview.on_demand_sandbox.transport import (
1314
OnDemandSandboxActivitiesGrpcTransport,
@@ -52,9 +53,3 @@ def enable_on_demand_sandbox_activities(self) -> None:
5253
def remove_on_demand_sandbox_activity_declaration(self, worker_profile_id: str) -> None:
5354
worker_profile_id = _normalize_required(worker_profile_id, "Worker profile ID is required.")
5455
self._transport.remove_on_demand_sandbox_activity_declaration(worker_profile_id)
55-
56-
57-
def _normalize_required(value: Optional[str], message: str) -> str:
58-
if not value or not value.strip():
59-
raise ValueError(message)
60-
return value.strip()

0 commit comments

Comments
 (0)