Skip to content

Commit

Permalink
Merge pull request #25 from graingert/fix-interceptor-abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert authored Dec 15, 2024
2 parents a883528 + be41b0a commit 41a10f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ async def main():


asyncio.run(main())
taskgroup.run(main())
5 changes: 4 additions & 1 deletion taskgroup/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import collections.abc
import contextvars
from typing import Any, Optional, Union
from typing_extensions import TypeAlias, TypeVar
from typing_extensions import TypeAlias, TypeVar, Self
import sys

_YieldT_co = TypeVar("_YieldT_co", covariant=True)
Expand Down Expand Up @@ -50,6 +50,9 @@ def throw(self, *exc_info) -> _YieldT_co:
def __getattr__(self, name):
return getattr(self.__coro, name)

def __await__(self) -> Self:
return self

def close(self) -> None:
super().close()

Expand Down

0 comments on commit 41a10f2

Please sign in to comment.