Skip to content

Typing issue when defining an async driver #1452

Description

@balazser

I'm encountering a type-checking error when trying to define an async_driver like this:

driver=awaitasync_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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagelabel for issues that need to be triaged.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions