https://dagster.io/ logo
#ask-community
Title
# ask-community
g

George Pearse

05/30/2022, 1:24 PM
Do both of these syntaxes support mypy validation?
🤖 1
o

owen

05/31/2022, 4:22 PM
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

George Pearse

06/01/2022, 11:56 AM
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

owen

06/01/2022, 3:46 PM
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
2 Views