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

Commit 50e6af4

Browse files
committed
fix pytype test
1 parent 4d0a8c4 commit 50e6af4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

google/cloud/bigquery/_job_helpers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ def _to_query_request(
287287
# Default to standard SQL.
288288
request_body.setdefault("useLegacySql", False)
289289

290-
request_body.setdefault("formatOptions", {})
290+
format_options = request_body.get("formatOptions", None)
291+
if not isinstance(format_options, dict):
292+
request_body["formatOptions"] = {}
291293

292294
# Cannot specify both use_int64_timestamp and timestamp_output_format.
293295
if timestamp_precision == enums.TimestampPrecision.PICOSECOND:

0 commit comments

Comments
 (0)