We all know that prefect flows and tasks are norma...
# ask-community
t
We all know that prefect flows and tasks are normally used as decorators:
Copy code
from prefect import flow, task

@task
def task_my_funct():
   ...
however, there are times were the function we want to decorate is already defined elsewhere, or its not appropriate to decorate. In this case we can still use the decorator in line without the syntax sugar
Copy code
from my_lib import my_func

task_my_funct = task(my_func)
This behaves as expected, but it really confuses the type checkers, which consider
task_my_func
to be a variable. Is there a way around this?