From 5238dd9d047d354efc70a8e89c05f78a6d64f136 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Tue, 17 Oct 2023 13:56:07 +0100 Subject: [PATCH] Use list() instead of useless comprehension, remove unused import --- src/textual/await_complete.py | 2 +- tests/test_screen_modes.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/textual/await_complete.py b/src/textual/await_complete.py index 28d5ba3f58..57f4905e0b 100644 --- a/src/textual/await_complete.py +++ b/src/textual/await_complete.py @@ -20,7 +20,7 @@ def __init__(self, *coroutine: Coroutine) -> None: """ self.coroutine = coroutine AwaitComplete._instances.add(self) - self._future: Future = gather(*[coroutine for coroutine in self.coroutine]) + self._future: Future = gather(*list(self.coroutine)) self._future.add_done_callback(self._on_done) async def __call__(self) -> ReturnType: diff --git a/tests/test_screen_modes.py b/tests/test_screen_modes.py index ed4df59715..2c7cdcbb66 100644 --- a/tests/test_screen_modes.py +++ b/tests/test_screen_modes.py @@ -10,7 +10,6 @@ InvalidModeError, UnknownModeError, ) -from textual.css.query import NoMatches from textual.screen import ModalScreen, Screen from textual.widgets import Footer, Header, Label, RichLog