Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
tybug committed Jan 9, 2025
1 parent dd27f2d commit 1675f29
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions hypothesis-python/src/hypothesis/internal/conjecture/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,18 +245,6 @@ def parent(self) -> Optional[int]:
return None
return self.owner.parentage[self.index]

@property
def start(self) -> int:
"""The position of the start of this example in the byte stream."""
return self.owner.starts[self.index]

@property
def end(self) -> int:
"""The position directly after the last byte in this byte stream.
i.e. the example corresponds to the half open region [start, end).
"""
return self.owner.ends[self.index]

@property
def ir_start(self) -> int:
return self.owner.ir_starts[self.index]
Expand All @@ -280,11 +268,6 @@ def discarded(self) -> bool:
generated value and try again."""
return self.index in self.owner.discarded

@property
def length(self) -> int:
"""The number of bytes in this example."""
return self.end - self.start

@property
def ir_length(self) -> int:
"""The number of ir nodes in this example."""
Expand Down Expand Up @@ -464,32 +447,6 @@ def __init__(self, record: ExampleRecord, blocks: "Blocks") -> None:
self.blocks = blocks
self.__children: "list[Sequence[int]] | None" = None

class _starts_and_ends(ExampleProperty):
def begin(self) -> None:
self.starts = IntList.of_length(len(self.examples))
self.ends = IntList.of_length(len(self.examples))

def start_example(self, i: int, label_index: int) -> None:
self.starts[i] = self.bytes_read

def stop_example(self, i: int, *, discarded: bool) -> None:
self.ends[i] = self.bytes_read

def finish(self) -> tuple[IntList, IntList]:
return (self.starts, self.ends)

starts_and_ends: "tuple[IntList, IntList]" = calculated_example_property(
_starts_and_ends
)

@property
def starts(self) -> IntList:
return self.starts_and_ends[0]

@property
def ends(self) -> IntList:
return self.starts_and_ends[1]

class _ir_starts_and_ends(ExampleProperty):
def begin(self) -> None:
self.starts = IntList.of_length(len(self.examples))
Expand Down

0 comments on commit 1675f29

Please sign in to comment.