Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/codegen/sdk/core/interfaces/editable.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,14 @@ def __contains__(self, item: str | Editable) -> bool:
def transaction_manager(self) -> TransactionManager:
return self.ctx.transaction_manager

@cached_property
@property
@noapidoc
@reader
def start_byte(self) -> int:
"""The start byte of the Editable instance that appears in file."""
return self.ts_node.start_byte

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

@cached_property
@property
@noapidoc
@reader
def _source(self) -> str:
Expand Down Expand Up @@ -657,7 +657,7 @@ def edit(self, new_src: str, fix_indentation: bool = False, priority: int = 0, d

t = EditTransaction(
self.start_byte,
self.ts_node.end_byte,
self.end_byte,
self.file,
new_src,
priority=priority,
Expand Down
Loading