I'm encountering a type-checking error when trying to define an async_driver like this:
driver = await async_driver.Builder().with_modules(my_flow).build()
Current behavior
Type checker (e.g. Pyright or mypy) reports:
Diagnostics:
1. "Driver" is not awaitable
"Driver" is incompatible with protocol "Awaitable[_T_co@Awaitable]"
"__await__" is not present [reportGeneralTypeIssues]
It seems the returned Driver object is missing an __await__ implementation or the builder’s build() method isn’t correctly annotated as returning an awaitable type.
I'm encountering a type-checking error when trying to define an
async_driverlike this:Current behavior
Type checker (e.g. Pyright or mypy) reports:
It seems the returned
Driverobject is missing an__await__implementation or the builder’sbuild()method isn’t correctly annotated as returning an awaitable type.