I’m running into a mypy issue with Prefect Tasks. Mypy will product an error
error: <nothing> not callable
for the task run when I try to test it out
Copy code
class MyTask(Task):
def run(self):
# do something
return True
if __name__ == "__main__":
my_task = MyTask()
with Flow("My Flow") as flow:
my_task()
flow.run()
Josh
01/14/2022, 11:03 PM
mypy will register the line where I call the task run as trying to call nothing.
my_task()
Josh
01/14/2022, 11:05 PM
User Error: Had something else in the namespace with the same variable name so was getting a clashing issue
k
Kevin Kho
01/14/2022, 11:16 PM
I don’t know mypy well but maybe you can assign it to a variable?
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.