Python version: 3.8
but also appears on 3.11
LSP (or mypy in this example) does not recognize the output of Deployment.build_from_flow
properly if it's used w/o async.
Output of running mypy example.py
:
example.py:27: error: "Coroutine[Any, Any, Deployment]" has no attribute "apply" [attr-defined]
example.py:27: note: Maybe you forgot to use "await"?
Found 1 error in 1 file (checked 1 source file)
Using async/await gets rid of the error, but it feels weird that the
official example
gives an error on mypy.
Note that prefect runs fine, there are no issues with deployment. This issue only affects linter.