Skip to content

Commit 2a57187

Browse files
committed
last test change
1 parent cd9280b commit 2a57187

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pyiceberg/catalog/rest/expression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class FalseExpression(IcebergBaseModel):
6666

6767
class TransformTerm(IcebergBaseModel):
6868
type: Literal["transform"] = "transform"
69-
transform: Transform
69+
transform: Transform[Any, Any]
7070
term: Reference
7171

7272

tests/catalog/test_rest_serializers.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
)
3232

3333

34-
def test_serialize_plan_table_scan_request():
34+
def test_serialize_plan_table_scan_request() -> None:
3535
"""Test serializing a PlanTableScanRequest to a dict"""
3636
expression = AndOrExpression(
3737
type="and",
@@ -63,7 +63,7 @@ def test_serialize_plan_table_scan_request():
6363
assert request.model_dump_json(exclude_none=True) == snapshot_json_for_plan_table_scan_request()
6464

6565

66-
def test_deserialize_plan_table_scan_request():
66+
def test_deserialize_plan_table_scan_request() -> None:
6767
"""Test deserializing a PlanTableScanRequest from a dict"""
6868
expression = AndOrExpression(
6969
type="and",
@@ -95,7 +95,7 @@ def test_deserialize_plan_table_scan_request():
9595
assert request == PlanTableScanRequest.model_validate_json(snapshot_json_for_plan_table_scan_request())
9696

9797

98-
def test_deserialize_scan_tasks():
98+
def test_deserialize_scan_tasks() -> None:
9999
"""Test deserializing a ScanTasks from a dict"""
100100
scan_tasks = ScanTasks.model_validate_json(snapshot_json_for_scan_tasks())
101101
assert len(scan_tasks.file_scan_tasks) == 1
@@ -105,7 +105,7 @@ def test_deserialize_scan_tasks():
105105
assert scan_tasks.delete_files[1].root.file_path == "/path/to/delete-b.parquet"
106106

107107

108-
def test_serialize_scan_tasks():
108+
def test_serialize_scan_tasks() -> None:
109109
"""Test serializing a ScanTasks to a dict"""
110110
scan_tasks = ScanTasks(
111111
file_scan_tasks=[
@@ -151,9 +151,9 @@ def test_serialize_scan_tasks():
151151
assert scan_tasks.model_dump_json(exclude_none=True) == snapshot_json_for_scan_tasks()
152152

153153

154-
def snapshot_json_for_plan_table_scan_request():
154+
def snapshot_json_for_plan_table_scan_request() -> str:
155155
return """{"snapshot-id":1,"select":["a","b","c"],"filter":{"type":"and","left":{"type":"or","left":{"type":"and","left":{"type":"lt","term":"a","value":{"type":"integer","value":1}},"right":{"type":"lt-eq","term":"b","value":{"type":"integer","value":2}}},"right":{"type":"eq","term":"c","value":{"type":"integer","value":3}}},"right":{"type":"gt","term":"d","value":{"type":"integer","value":4}}},"case-sensitive":true,"use-snapshot-schema":false}"""
156156

157157

158-
def snapshot_json_for_scan_tasks():
158+
def snapshot_json_for_scan_tasks() -> str:
159159
return """{"delete-files":[{"content":"position-deletes","file-path":"/path/to/delete-a.parquet","file-format":"parquet","spec-id":0,"partition":[],"file-size-in-bytes":256,"record-count":10},{"content":"equality-deletes","file-path":"/path/to/delete-b.parquet","file-format":"parquet","spec-id":0,"partition":[],"file-size-in-bytes":256,"record-count":10,"equality-ids":[1,2]}],"file-scan-tasks":[{"data-file":{"content":"data","file-path":"/path/to/data-a.parquet","file-format":"parquet","spec-id":0,"partition":[],"file-size-in-bytes":1024,"record-count":56},"delete-file-references":[0,1]}]}"""

0 commit comments

Comments
 (0)