Skip to content

Commit 565723e

Browse files
committed
run code linting and apply formatting
1 parent 2a1bf5c commit 565723e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pyiceberg/partitioning.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -467,15 +467,15 @@ def _(type: IcebergType, value: Optional[time]) -> Optional[int]:
467467

468468

469469
@_to_partition_representation.register(UUIDType)
470-
def _(type: IcebergType, value: Optional[Union[uuid.UUID,int]]) -> Optional[Union[str,int]]:
471-
if value is None:
470+
def _(type: IcebergType, value: Optional[Union[uuid.UUID, int]]) -> Optional[Union[str, int]]:
471+
if value is None:
472472
return None
473-
if isinstance(value, uuid.UUID):
474-
return str(value) # IdentityTransform
473+
elif isinstance(value, uuid.UUID):
474+
return str(value) # IdentityTransform
475475
elif isinstance(value, int):
476-
return value # BucketTransform
476+
return value # BucketTransform
477477
else:
478-
return value
478+
raise ValueError(f"Type not recognized: {value}")
479479

480480

481481
@_to_partition_representation.register(PrimitiveType)

0 commit comments

Comments
 (0)