Open irux opened 11 months ago
@irux I have a draft PR here to fix it: https://github.com/ryananguiano/async_property/pull/15/files
haven't tested it yet. maybe you can install from this branch and test it out?
@ryananguiano Just tried out the branch, it doesn't solve the issue:
<REDACTED>:19:22 - error: "AsyncCachedPropertyDescriptor" is not awaitable
"AsyncCachedPropertyDescriptor" is incompatible with protocol "Awaitable[_T_co@Awaitable]"
"__await__" is not present (reportGeneralTypeIssues)
<REDACTED>:19:22 - error: "AwaitableProxy" is not awaitable
"AwaitableProxy" is incompatible with protocol "Awaitable[_T_co@Awaitable]"
"__await__" is an incompatible type
Type "() -> T@__await__" cannot be assigned to type "() -> Generator[Any, None, _T_co@Awaitable]"
Function return type "T@__await__" is incompatible with type "Generator[Any, None, _T_co@Awaitable]"
"object*" is incompatible with "Generator[Any, None, _T_co@Awaitable]" (reportGeneralTypeIssues)
Description
I am having problems with pyright because of the types. when I try to await an
async_cached_property
I get the following hint:What I Did
https://github.com/bakdata/kpops/blob/2f7212fa00660b4219cb4532c734ac220b330bdd/kpops/component_handlers/topic/proxy_wrapper.py#L106
https://github.com/bakdata/kpops/blob/2f7212fa00660b4219cb4532c734ac220b330bdd/kpops/component_handlers/topic/proxy_wrapper.py#L37