prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Type warning with `AwaitComplete`
  It seems that there is a type error when it comes to awaiting `AwaitComplete`. As an example, given this code:
  
  ```python
  from textual.app import App
  from textual.widgets import TabbedContent, TabPane
  
  class AwaitableTypeWarningApp(App[None]):
  
      async def on_mount(self) -> None:
          await self.query_one(TabbedContent).add_pane(TabPane("Test"))
          await self.query_one(TabbedContent).remove_pane("some-tab")
  ```
  
  pyright reports:
  
  ```
  /Users/davep/develop/python/textual-sandbox/await_type_warning.py
    /Users/davep/develop/python/textual-sandbox/await_type_warning.py:7:15 - error: "AwaitComplete" is not awaitable
      "AwaitComplete" is incompatible with protocol "Awaitable[_T_co@Awaitable]"
        "__await__" is an incompatible type
          Type "() -> Iterator[None]" cannot be assigned to type "() -> Generator[Any, None, _T_co@Awaitable]"
            Function return type "Iterator[None]" is incompatible with type "Generator[Any, None, _T_co@Awaitable]"
              "Iterator[None]" is incompatible with "Generator[Any, None, _T_co@Awaitable]" (reportGeneralTypeIssues)
    /Users/davep/develop/python/textual-sandbox/await_type_warning.py:8:15 - error: "AwaitComplete" is not awaitable
      "AwaitComplete" is incompatible with protocol "Awaitable[_T_co@Awaitable]"
        "__await__" is an incompatible type
          Type "() -> Iterator[None]" cannot be assigned to type "() -> Generator[Any, None, _T_co@Awaitable]"
            Function return type "Iterator[None]" is incompatible with type "Generator[Any, None, _T_co@Awaitable]"
              "Iterator[None]" is incompatible with "Generator[Any, None, _T_co@Awaitable]" (reportGeneralTypeIssues)
  2 errors, 0 warnings, 0 informations 
  ```
  
  </issue>
  <code>
  [start of src/textual/await_complete.py]
  1 from __future__ import annotations
  2 
  3 from asyncio import Future, gather
  4 from typing import Any, Coroutine, Iterator, TypeVar
  5 
  6 import rich.repr
  7 
  8 ReturnType = TypeVar("ReturnType")
  9 
  10 
  11 @rich.repr.auto(angular=True)
  12 class AwaitComplete:
  13     """An 'optionally-awaitable' object."""
  14 
  15     def __init__(self, *coroutines: Coroutine[Any, Any, Any]) -> None:
  16         """Create an AwaitComplete.
  17 
  18         Args:
  19             coroutines: One or more coroutines to execute.
  20         """
  21         self.coroutines: tuple[Coroutine[Any, Any, Any], ...] = coroutines
  22         self._future: Future = gather(*self.coroutines)
  23 
  24     async def __call__(self) -> Any:
  25         return await self
  26 
  27     def __await__(self) -> Iterator[None]:
  28         return self._future.__await__()
  29 
  30     @property
  31     def is_done(self) -> bool:
  32         """Returns True if the task has completed."""
  33         return self._future.done()
  34 
  35     @property
  36     def exception(self) -> BaseException | None:
  37         """An exception if it occurred in any of the coroutines."""
  38         if self._future.done():
  39             return self._future.exception()
  40         return None
  41 
  42     @classmethod
  43     def nothing(cls):
  44         """Returns an already completed instance of AwaitComplete."""
  45         instance = cls()
  46         instance._future = Future()
  47         instance._future.set_result(None)  # Mark it as completed with no result
  48         return instance
  49
  [end of src/textual/await_complete.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/src/textual/await_complete.py b/src/textual/await_complete.py
  --- a/src/textual/await_complete.py
  +++ b/src/textual/await_complete.py
  @@ -1,7 +1,7 @@
   from __future__ import annotations
   
   from asyncio import Future, gather
  -from typing import Any, Coroutine, Iterator, TypeVar
  +from typing import Any, Coroutine, Generator, TypeVar
   
   import rich.repr
   
  @@ -19,12 +19,12 @@
               coroutines: One or more coroutines to execute.
           """
           self.coroutines: tuple[Coroutine[Any, Any, Any], ...] = coroutines
  -        self._future: Future = gather(*self.coroutines)
  +        self._future: Future[Any] = gather(*self.coroutines)
   
       async def __call__(self) -> Any:
           return await self
   
  -    def __await__(self) -> Iterator[None]:
  +    def __await__(self) -> Generator[Any, None, Any]:
           return self._future.__await__()
   
       @property
  
verification_info: {"golden_diff": "diff --git a/src/textual/await_complete.py b/src/textual/await_complete.py\n--- a/src/textual/await_complete.py\n+++ b/src/textual/await_complete.py\n@@ -1,7 +1,7 @@\n from __future__ import annotations\n \n from asyncio import Future, gather\n-from typing import Any, Coroutine, Iterator, TypeVar\n+from typing import Any, Coroutine, Generator, TypeVar\n \n import rich.repr\n \n@@ -19,12 +19,12 @@\n             coroutines: One or more coroutines to execute.\n         \"\"\"\n         self.coroutines: tuple[Coroutine[Any, Any, Any], ...] = coroutines\n-        self._future: Future = gather(*self.coroutines)\n+        self._future: Future[Any] = gather(*self.coroutines)\n \n     async def __call__(self) -> Any:\n         return await self\n \n-    def __await__(self) -> Iterator[None]:\n+    def __await__(self) -> Generator[Any, None, Any]:\n         return self._future.__await__()\n \n     @property\n", "issue": "Type warning with `AwaitComplete`\nIt seems that there is a type error when it comes to awaiting `AwaitComplete`. As an example, given this code:\r\n\r\n```python\r\nfrom textual.app import App\r\nfrom textual.widgets import TabbedContent, TabPane\r\n\r\nclass AwaitableTypeWarningApp(App[None]):\r\n\r\n    async def on_mount(self) -> None:\r\n        await self.query_one(TabbedContent).add_pane(TabPane(\"Test\"))\r\n        await self.query_one(TabbedContent).remove_pane(\"some-tab\")\r\n```\r\n\r\npyright reports:\r\n\r\n```\r\n/Users/davep/develop/python/textual-sandbox/await_type_warning.py\r\n  /Users/davep/develop/python/textual-sandbox/await_type_warning.py:7:15 - error: \"AwaitComplete\" is not awaitable\r\n  \u00a0\u00a0\"AwaitComplete\" is incompatible with protocol \"Awaitable[_T_co@Awaitable]\"\r\n  \u00a0\u00a0\u00a0\u00a0\"__await__\" is an incompatible type\r\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Type \"() -> Iterator[None]\" cannot be assigned to type \"() -> Generator[Any, None, _T_co@Awaitable]\"\r\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Function return type \"Iterator[None]\" is incompatible with type \"Generator[Any, None, _T_co@Awaitable]\"\r\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"Iterator[None]\" is incompatible with \"Generator[Any, None, _T_co@Awaitable]\" (reportGeneralTypeIssues)\r\n  /Users/davep/develop/python/textual-sandbox/await_type_warning.py:8:15 - error: \"AwaitComplete\" is not awaitable\r\n  \u00a0\u00a0\"AwaitComplete\" is incompatible with protocol \"Awaitable[_T_co@Awaitable]\"\r\n  \u00a0\u00a0\u00a0\u00a0\"__await__\" is an incompatible type\r\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Type \"() -> Iterator[None]\" cannot be assigned to type \"() -> Generator[Any, None, _T_co@Awaitable]\"\r\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Function return type \"Iterator[None]\" is incompatible with type \"Generator[Any, None, _T_co@Awaitable]\"\r\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"Iterator[None]\" is incompatible with \"Generator[Any, None, _T_co@Awaitable]\" (reportGeneralTypeIssues)\r\n2 errors, 0 warnings, 0 informations \r\n```\n", "before_files": [{"content": "from __future__ import annotations\n\nfrom asyncio import Future, gather\nfrom typing import Any, Coroutine, Iterator, TypeVar\n\nimport rich.repr\n\nReturnType = TypeVar(\"ReturnType\")\n\n\n@rich.repr.auto(angular=True)\nclass AwaitComplete:\n    \"\"\"An 'optionally-awaitable' object.\"\"\"\n\n    def __init__(self, *coroutines: Coroutine[Any, Any, Any]) -> None:\n        \"\"\"Create an AwaitComplete.\n\n        Args:\n            coroutines: One or more coroutines to execute.\n        \"\"\"\n        self.coroutines: tuple[Coroutine[Any, Any, Any], ...] = coroutines\n        self._future: Future = gather(*self.coroutines)\n\n    async def __call__(self) -> Any:\n        return await self\n\n    def __await__(self) -> Iterator[None]:\n        return self._future.__await__()\n\n    @property\n    def is_done(self) -> bool:\n        \"\"\"Returns True if the task has completed.\"\"\"\n        return self._future.done()\n\n    @property\n    def exception(self) -> BaseException | None:\n        \"\"\"An exception if it occurred in any of the coroutines.\"\"\"\n        if self._future.done():\n            return self._future.exception()\n        return None\n\n    @classmethod\n    def nothing(cls):\n        \"\"\"Returns an already completed instance of AwaitComplete.\"\"\"\n        instance = cls()\n        instance._future = Future()\n        instance._future.set_result(None)  # Mark it as completed with no result\n        return instance\n", "path": "src/textual/await_complete.py"}]}