Closed cretz closed 3 months ago
Also note that the return type for execute_update
and similar is not properly inferred from the method in Pyright like it is in MyPy
Another example:
samples-python(main) .venv/bin/pyright --pythonpath .venv/bin/python hello/hello_activity.py
/Users/dan/src/temporalio/samples-python/hello/hello_activity.py
/Users/dan/src/temporalio/samples-python/hello/hello_activity.py:58:24 - error: No overloads for "execute_workflow" match the provided arguments (reportCallIssue)
/Users/dan/src/temporalio/samples-python/hello/hello_activity.py:59:13 - error: Argument of type "(self: GreetingWorkflow, name: str) -> Coroutine[Any, Any, str]" cannot be assigned to parameter "workflow" of type "str" in function "execute_workflow"
"function" is incompatible with "str" (reportArgumentType)
2 errors, 0 warnings, 0 informations
samples-python(main) .venv/bin/pyright --version
pyright 1.1.350
samples-python(main) .venv/bin/python --version
Python 3.10.13
So #471 probably fixed this error, but leaving this open because we still want pyright in CI
Describe the solution you'd like
Right now vscode/pylance/pyright fails with:
I think we probably just need to remove the typing for multi-param update (use
Sequence[Any]
like signal/query). Then we need to add https://github.com/microsoft/pyright to CI alongside MyPy if it's not too difficult.