Hi everyone! Does someone have an example of how t...
# ask-community
i
Hi everyone! Does someone have an example of how to make dagster_type checks work when I want to pass there Union with custom class and something else like python built-in. ScalarUnion seems like not supposed to cover this case since there is no scalar class and PythonObjectDagsterType does not support custom classes just python buillt-in types.
c
Can you send an example of the type you would want to work?
i
To be honest, it`s just simple Enum, so my code looks like this:
Copy code
class Foo(Enum):
  bar = "bar"
  buz = "buz"

@op
def my_cool_op(some_input: Dict[str, Union[str, Foo]):
  pass
So from here part with
Union[str, Foo]
just does not want work whatever I`m trying.