diff --git a/src/textual/_compositor.py b/src/textual/_compositor.py index 7461fd5f2..7aa0fe7ee 100644 --- a/src/textual/_compositor.py +++ b/src/textual/_compositor.py @@ -100,11 +100,11 @@ class ChopsUpdate: def __init__( self, chops: list[dict[int, list[Segment] | None]], crop: Region ) -> None: - """Apply spans, which consist of a tuple of (LINE, OFFSET, SEGMENTS) + """A renderable which updates chops (fragments of lines). Args: - spans (list[tuple[int, int, list[Segment]]]): A list of spans. - crop_y (int): The y extent of the crop region + chops (list[dict[int, list[Segment] | None]]): A mapping of offsets to list of segments, per line. + crop (Region): Region to restrict update to. """ self.chops = chops self.crop = crop diff --git a/tests/test_cache.py b/tests/test_cache.py index 305060ae4..e81b7e06a 100644 --- a/tests/test_cache.py +++ b/tests/test_cache.py @@ -1,3 +1,4 @@ +from __future__ import annotations from __future__ import unicode_literals import pytest