From a6656e202b6d06122bba9c6088c0fe7703222550 Mon Sep 17 00:00:00 2001 From: Tushar Sadhwani Date: Tue, 29 Mar 2022 23:55:32 +0530 Subject: [PATCH 1/2] Stringify the cast type, for <3.10 support --- src/textual/_compositor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textual/_compositor.py b/src/textual/_compositor.py index 71e2e77a32..ef24da7230 100644 --- a/src/textual/_compositor.py +++ b/src/textual/_compositor.py @@ -471,7 +471,7 @@ def render( cuts = self.cuts # dict.fromkeys is a callable which takes a list of ints returns a dict which maps ints on to a list of Segments or None. fromkeys = cast( - Callable[[list[int]], dict[int, list[Segment] | None]], dict.fromkeys + 'Callable[[list[int]], dict[int, list[Segment] | None]]', dict.fromkeys ) # A mapping of cut index to a list of segments for each line chops: list[dict[int, list[Segment] | None]] = [ From 54b72f5d5e9f94c3471421199d38cc4f4afaeb39 Mon Sep 17 00:00:00 2001 From: Tushar Sadhwani Date: Tue, 29 Mar 2022 23:59:33 +0530 Subject: [PATCH 2/2] Black --- src/textual/_compositor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textual/_compositor.py b/src/textual/_compositor.py index ef24da7230..4b7d6ea03a 100644 --- a/src/textual/_compositor.py +++ b/src/textual/_compositor.py @@ -471,7 +471,7 @@ def render( cuts = self.cuts # dict.fromkeys is a callable which takes a list of ints returns a dict which maps ints on to a list of Segments or None. fromkeys = cast( - 'Callable[[list[int]], dict[int, list[Segment] | None]]', dict.fromkeys + "Callable[[list[int]], dict[int, list[Segment] | None]]", dict.fromkeys ) # A mapping of cut index to a list of segments for each line chops: list[dict[int, list[Segment] | None]] = [