Hey all. I've been struggling recently with a type error from Pyright with my flows. I've just upgraded to Prefect 3.1.7. I'll thread the error I'm getting so they don't clutter.
When I decorate a flow simply with
@flow
, everything is fine. When I try to add arguments, such as
, I get the error in the thread.
Thanks in advance for any help!
Nash Taylor
12/17/2024, 3:45 AM
Copy code
Argument of type "ThreadPoolTaskRunner" cannot be assigned to parameter "task_runner" of type "TaskRunner[PrefectFuture[R@flow]] | None" in function "flow"
Type "ThreadPoolTaskRunner" is incompatible with type "TaskRunner[PrefectFuture[R@flow]] | None"
"ThreadPoolTaskRunner" is incompatible with "TaskRunner[PrefectFuture[R@flow]]"
Type parameter "F@TaskRunner" is invariant, but "PrefectConcurrentFuture[Unknown]" is not the same as "PrefectFuture[R@flow]"
"ThreadPoolTaskRunner" is incompatible with "None"PylancereportArgumentType
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.