Skip to content

Commit

Permalink
rewrite validator
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjqliu committed Mar 8, 2024
1 parent 5616ef0 commit 79a5954
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyiceberg/table/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,10 @@ class SetLocationUpdate(TableUpdate):
class SetPropertiesUpdate(TableUpdate):
action: TableUpdateAction = TableUpdateAction.set_properties
updates: Properties
# validators
transform_properties_dict_value_to_str = field_validator('updates', mode='before')(transform_dict_value_to_str)

@field_validator('updates', mode='before')
def transform_properties_dict_value_to_str(cls, properties: Properties) -> Dict[str, str]:
return transform_dict_value_to_str(properties)


class RemovePropertiesUpdate(TableUpdate):
Expand Down

0 comments on commit 79a5954

Please sign in to comment.