From 4f6a71bc33e4e8743e3e21bce7780fa3709771a8 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Tue, 21 Jun 2022 14:11:18 +0100 Subject: [PATCH] annotations --- src/textual/_compositor.py | 6 +++--- tests/test_cache.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) 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