Skip to content

Commit 4d3c4a9

Browse files
docs: trim comments that narrate rather than explain
Each of these stated what the line below it does, or described a prior state that is no longer there to check against. Keep the reason, drop the narration.
1 parent 0882b45 commit 4d3c4a9

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

src/unstract/api_deployments/client.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -460,9 +460,9 @@ def structure_file(
460460
"presigned_urls": presigned_urls,
461461
"custom_data": custom_data,
462462
}
463-
# ``None`` is dropped with ``UNSET``: these are optional overrides, and
464-
# a form field carries no null — the previous transport would have sent
465-
# the literal string "None" for the service to look up.
463+
# ``None`` is dropped with ``UNSET``: these are optional overrides, and a
464+
# form field carries no null, so one would go out as the string "None"
465+
# for the service to look up.
466466
requested = {
467467
k: v
468468
for k, v in requested.items()
@@ -518,13 +518,12 @@ def structure_file(
518518

519519
try:
520520
if params["timeout"] == 0:
521-
# Async mode: server returns immediately after queuing.
522-
# A 5xx means queuing failed — safe to retry.
521+
# The request only queues the execution, so a 5xx means queuing
522+
# failed and retrying cannot duplicate work.
523523
response = self._request_with_retry(method, url, **request_kwargs)
524524
else:
525-
# Sync mode: server blocks during processing.
526-
# A 5xx may mean it processed but response was lost — don't retry
527-
# to avoid duplicate executions.
525+
# The request runs the execution, so a 5xx may mean it ran and
526+
# the response was lost: a retry would execute it twice.
528527
response = self._send(method, url, **request_kwargs)
529528
finally:
530529
for handle in handles:

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)