Syntax adaptations prefect 1.x to 2.x

Hi there

I am about to update prefect scripts from 1.x to 2.x version. We used to define task decorator with nout, e.g.

@task(nout=6, log_prints=True)

def blabla():

Is there any substitution of “nout” for prefect 2.x?


I looked up the 1.x documentation. The arg nout refers to the outputs of that task. It was marked as optional i.e. it will be inferred by prefect. Omitting the arg shouldn’t break the code. Their doesn’t feel the need to do this. Try removing the arg for 2.x