Skip to content

Commit 5cf6403

Browse files
committed
Formatting
1 parent 0745e6a commit 5cf6403

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

awswrangler/_data_types.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
_logger: logging.Logger = logging.getLogger(__name__)
1717

1818

19-
def pyarrow2athena(dtype: pa.DataType, ignore_null: bool) -> Optional[str]: # pylint: disable=too-many-branches,too-many-return-statements
19+
def pyarrow2athena(
20+
dtype: pa.DataType, ignore_null: bool
21+
) -> Optional[str]: # pylint: disable=too-many-branches,too-many-return-statements
2022
"""Pyarrow to Athena data types conversion."""
2123
if pa.types.is_int8(dtype):
2224
return "tinyint"
@@ -587,7 +589,9 @@ def pyarrow_schema_from_pandas(
587589

588590

589591
def athena_types_from_pyarrow_schema(
590-
schema: pa.Schema, partitions: Optional[pyarrow.parquet.ParquetPartitions], ignore_null: bool,
592+
schema: pa.Schema,
593+
partitions: Optional[pyarrow.parquet.ParquetPartitions],
594+
ignore_null: bool,
591595
) -> Tuple[Dict[str, str], Optional[Dict[str, str]]]:
592596
"""Extract the related Athena data types from any PyArrow Schema considering possible partitions."""
593597
columns_types: Dict[str, str] = {str(f.name): pyarrow2athena(dtype=f.type, ignore_null=ignore_null) for f in schema}

awswrangler/s3/_read_parquet.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ def _read_parquet_metadata_file(
7878
)
7979
if pq_file is None:
8080
return None
81-
return _data_types.athena_types_from_pyarrow_schema(schema=pq_file.schema.to_arrow_schema(), partitions=None, ignore_null=ignore_null)[0]
81+
return _data_types.athena_types_from_pyarrow_schema(
82+
schema=pq_file.schema.to_arrow_schema(), partitions=None, ignore_null=ignore_null
83+
)[0]
8284

8385

8486
def _read_schemas_from_files(

0 commit comments

Comments
 (0)