diff --git a/pandas_gbq/schema/pyarrow_to_bigquery.py b/pandas_gbq/schema/pyarrow_to_bigquery.py index 789cd46e..392c7496 100644 --- a/pandas_gbq/schema/pyarrow_to_bigquery.py +++ b/pandas_gbq/schema/pyarrow_to_bigquery.py @@ -78,8 +78,12 @@ def arrow_type_to_bigquery_field( return None -def arrow_list_type_to_bigquery(name, type_, default_type="STRING") -> Optional[schema.SchemaField]: - inner_field = arrow_type_to_bigquery_field(name, type_.value_type, default_type=default_type) +def arrow_list_type_to_bigquery( + name, type_, default_type="STRING" +) -> Optional[schema.SchemaField]: + inner_field = arrow_type_to_bigquery_field( + name, type_.value_type, default_type=default_type + ) if inner_field is None: return None diff --git a/tests/unit/schema/test_pyarrow_to_bigquery.py b/tests/unit/schema/test_pyarrow_to_bigquery.py index 07f14611..dc5504f9 100644 --- a/tests/unit/schema/test_pyarrow_to_bigquery.py +++ b/tests/unit/schema/test_pyarrow_to_bigquery.py @@ -42,16 +42,14 @@ def test_arrow_type_to_bigquery_field_scalar_types(pyarrow_type, bigquery_type): def test_arrow_type_to_bigquery_field_unknown(): - assert ( - pyarrow_to_bigquery.arrow_type_to_bigquery_field("test_name", pyarrow.null(), default_type="DEFAULT_TYPE") - == bigquery.SchemaField("test_name", "DEFAULT_TYPE") - ) + assert pyarrow_to_bigquery.arrow_type_to_bigquery_field( + "test_name", pyarrow.null(), default_type="DEFAULT_TYPE" + ) == bigquery.SchemaField("test_name", "DEFAULT_TYPE") def test_arrow_type_to_bigquery_field_list_of_unknown(): - assert ( - pyarrow_to_bigquery.arrow_type_to_bigquery_field( - "test_name", pyarrow.list_(pyarrow.null()), default_type="DEFAULT_TYPE", - ) - == bigquery.SchemaField("test_name", "DEFAULT_TYPE", mode="REPEATED") - ) + assert pyarrow_to_bigquery.arrow_type_to_bigquery_field( + "test_name", + pyarrow.list_(pyarrow.null()), + default_type="DEFAULT_TYPE", + ) == bigquery.SchemaField("test_name", "DEFAULT_TYPE", mode="REPEATED")