Skip to content

Commit 63f65a7

Browse files
committed
fix: resolve mypy description type mismatch error
1 parent 1424700 commit 63f65a7

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

bigframes/dtypes.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -834,11 +834,16 @@ def convert_to_schema_field(
834834
convert_to_schema_field(field.name, inner_bf_type, overrides)
835835
)
836836

837-
description = (
838-
OBJ_REF_DESCRIPTION_TAG if bigframes_dtype == OBJ_REF_DTYPE else None
839-
)
837+
if bigframes_dtype == OBJ_REF_DTYPE:
838+
return google.cloud.bigquery.SchemaField(
839+
name,
840+
"RECORD",
841+
fields=inner_fields,
842+
description=OBJ_REF_DESCRIPTION_TAG,
843+
)
844+
840845
return google.cloud.bigquery.SchemaField(
841-
name, "RECORD", fields=inner_fields, description=description
846+
name, "RECORD", fields=inner_fields
842847
)
843848
if bigframes_dtype.pyarrow_dtype == pa.duration("us"):
844849
# Timedeltas are represented as integers in microseconds.

0 commit comments

Comments
 (0)