Skip to content

Commit fa4e3ad

Browse files
authored
fix: replace empty dict with None to avoid mutable default arguments (#1416)
* fix: replace empty dict wit None to avoid mutable default arguments * fix format
1 parent 800640a commit fa4e3ad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bigframes/core/schema.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,12 @@ class ArraySchema:
4141
def from_bq_table(
4242
cls,
4343
table: google.cloud.bigquery.Table,
44-
column_type_overrides: typing.Dict[str, bigframes.dtypes.Dtype] = {},
44+
column_type_overrides: typing.Optional[
45+
typing.Dict[str, bigframes.dtypes.Dtype]
46+
] = None,
4547
):
48+
if column_type_overrides is None:
49+
column_type_overrides = {}
4650
items = tuple(
4751
SchemaItem(name, column_type_overrides.get(name, dtype))
4852
for name, dtype in bigframes.dtypes.bf_type_from_type_kind(

0 commit comments

Comments
 (0)