Skip to content

Commit

Permalink
feat: HiddenMethod property getter awaitable without calling (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Mar 1, 2024
1 parent 50d73a3 commit 21978a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions a_sync/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ def _should_await(self, kwargs: dict) -> bool:
return self.__self__.__a_sync_should_await_from_kwargs__(kwargs)
except (AttributeError, exceptions.NoFlagsFound):
return False
def __await__(self) -> Generator[Any, None, T]:
return self().__await__()

class HiddenMethodDescriptor(ASyncMethodDescriptorAsyncDefault[O, P, T]):
def __get__(self, instance: O, owner: Any) -> HiddenMethod[O, T]:
Expand Down

0 comments on commit 21978a4

Please sign in to comment.