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

Commit fc33078

Browse files
committed
use # type ignore instead
1 parent cf0c61d commit fc33078

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

google/cloud/bigquery/_job_helpers.py

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

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

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

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

0 commit comments

Comments
 (0)