Skip to content

Commit f928f6d

Browse files
author
codegen-bot
committed
fix test_ast
1 parent b8846bd commit f928f6d

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/codegen/sdk/codebase/span.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,22 @@ def range_json_schema() -> JsonSchemaValue:
5454
class Span(BaseModel):
5555
"""Range within the codebase"""
5656

57-
model_config = ConfigDict(frozen=True)
57+
model_config = ConfigDict(
58+
frozen=True,
59+
json_encoders={
60+
Range: lambda r: {
61+
"start_byte": r.start_byte,
62+
"end_byte": r.end_byte,
63+
"start_point": {
64+
"row": r.start_point.row,
65+
"column": r.start_point.column,
66+
},
67+
"end_point": {
68+
"row": r.end_point.row,
69+
"column": r.end_point.column,
70+
},
71+
}
72+
},
73+
)
5874
range: RangeAdapter
5975
filepath: str

0 commit comments

Comments
 (0)