Alessandro De Rose05/21/2023, 10:22 AM
is complaining when attempting to unpack a tuple returned from a task. In the example below, when attempting to unpack
from the call to
raises the error
. However, the type definition for the
"None" object is not iterable
function shows that
should never be returned from the task. Any idea what's wrong here? (Prefect v2.10.10, mypy v1.3.0)
from prefect import flow, task @task def get_numbers(a: int, b: int) -> tuple[int, int]: return a, b @flow def get_numbers_flow() -> None: a, b = get_numbers(1, 2) # <- "None" object is not iterable.
Tim Galvin05/22/2023, 1:10 AM
mightt be type checking against what is now a wrapped function - wrapped via the
decorator. I am not too sure what can be done about this. If you use
do you get a similar warning?
Alessandro De Rose05/22/2023, 7:55 AM
"None" has no attribute "submit"