Skip to content

Commit 12cc0c6

Browse files
authored
Fix file.edit codebase corruption (#722)
# Motivation <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed
1 parent a98d523 commit 12cc0c6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/codegen/sdk/core/interfaces/editable.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,14 @@ def __contains__(self, item: str | Editable) -> bool:
189189
def transaction_manager(self) -> TransactionManager:
190190
return self.ctx.transaction_manager
191191

192-
@cached_property
192+
@property
193193
@noapidoc
194194
@reader
195195
def start_byte(self) -> int:
196196
"""The start byte of the Editable instance that appears in file."""
197197
return self.ts_node.start_byte
198198

199-
@cached_property
199+
@property
200200
@noapidoc
201201
@reader
202202
@final
@@ -227,7 +227,7 @@ def line_range(self) -> range:
227227
"""The 0-indexed line/row range that the Editable instance spans in the file."""
228228
return range(self.start_point[0], self.end_point[0] + 1) # +1 b/c end_point[0] is inclusive
229229

230-
@cached_property
230+
@property
231231
@noapidoc
232232
@reader
233233
def _source(self) -> str:
@@ -657,7 +657,7 @@ def edit(self, new_src: str, fix_indentation: bool = False, priority: int = 0, d
657657

658658
t = EditTransaction(
659659
self.start_byte,
660-
self.ts_node.end_byte,
660+
self.end_byte,
661661
self.file,
662662
new_src,
663663
priority=priority,

0 commit comments

Comments
 (0)