Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit cf0c61d

Browse files
committed
fix pytype
1 parent 50e6af4 commit cf0c61d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

google/cloud/bigquery/_job_helpers.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,15 +289,16 @@ def _to_query_request(
289289

290290
format_options = request_body.get("formatOptions", None)
291291
if not isinstance(format_options, dict):
292-
request_body["formatOptions"] = {}
292+
format_options = {}
293+
request_body["formatOptions"] = format_options
293294

294295
# Cannot specify both use_int64_timestamp and timestamp_output_format.
295296
if timestamp_precision == enums.TimestampPrecision.PICOSECOND:
296-
request_body["formatOptions"]["timestampOutputFormat"] = "ISO8601_STRING"
297+
format_options["timestampOutputFormat"] = "ISO8601_STRING"
297298
else:
298299
# Since jobs.query can return results, ensure we use the lossless
299300
# timestamp format. See: https://github.com/googleapis/python-bigquery/issues/395
300-
request_body["formatOptions"]["useInt64Timestamp"] = True
301+
format_options["useInt64Timestamp"] = True
301302

302303
if timeout is not None:
303304
# Subtract a buffer for context switching, network latency, etc.

0 commit comments

Comments
 (0)