Hello, After upgrading to 3.1.6, mypy is reporting...
# ask-community
d
Hello, After upgrading to 3.1.6, mypy is reporting a lot of errors especially around
flow
that are declared with
name
and
flow_run_name
The issue is not present in 3.1.5 There are 2 types of errors On the flow definition itself
Copy code
backend/infrahub/computed_attribute/tasks.py:638: error: Argument 1 has
incompatible type "Callable[[str, str, str], Coroutine[Any, Any, None]]";
expected "Callable[[str, str, str], Never]"  [arg-type]
    @flow(
     ^
When we are calling the flow as a python function
Copy code
backend/tests/integration/services/adapters/workflow/test_setup.py:14: error:
Incompatible types in "await" (actual type "None", expected type
"Awaitable[Any]")  [misc]
            await setup_task_manager()
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
Here is how the flow definition looks like
Copy code
@flow(
    name="query-computed-attribute-transform-targets",
    flow_run_name="Query for potential targets of computed attributes for {node_kind}",
)
async def query_transform_targets(
I'm happy to open an issue on GH if that's helpful, not sure what is the recommended way (slack or GH first ?)
a
yeah Github is a good place to start, thanks! trying to get Prefect to 100% type safety which means a lot of our very lax types are getting less lax.
👍 1