Do both of these syntaxes support mypy validation?
# ask-community
g
Do both of these syntaxes support mypy validation?
🤖 1
o
Hi @George Pearse! The first example cannot be statically type checked, and the second one can. The types on the first example will be validated at runtime.
❤️ 1
g
Cheers @owen the second requires the out definition to work as well doesn't it? Think I tried the type annotation alone and was receiving errors.
o
ah yeah you do need to tell Dagster to expect two separate outputs. if you don't include the Outs, then I believe this op will be treated as if it has a single output (which happens to be of type tuple), so when you're composing it inside your graph, you won't be able to do stuff like
word, num = multi_out()
(you'd have to do
word_and_num = multi_out()
)
❤️ 1