Skip to content

Commit

Permalink
dummy awaitable
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed May 11, 2024
1 parent aaa5b11 commit 2763370
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/textual/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from __future__ import annotations

from asyncio import Future, Lock, create_task, wait
from asyncio import Lock, create_task, wait
from collections import Counter
from contextlib import asynccontextmanager
from fractions import Fraction
Expand Down Expand Up @@ -635,10 +635,10 @@ def set_loading(self, loading: bool) -> Awaitable:
for child in self.children:
if child.has_class(LOADING_INDICATOR_CLASS):
return child.remove()
dummy_awaitable: Future[None] = Future()
dummy_awaitable.set_result(None)
# Dummy awaitable
return dummy_awaitable

async def dummy(): ...

return dummy()

async def _watch_loading(self, loading: bool) -> None:
"""Called when the 'loading' reactive is changed."""
Expand Down

0 comments on commit 2763370

Please sign in to comment.