Simon
03/31/2023, 8:17 PMtyping.Literal
not supported for the Pythonic run config? I'm getting the following when trying to use it
Error loading repository location test_literal.py:dagster._core.errors.DagsterInvalidConfigDefinitionError: Error defining config. Original value passed: typing.Literal['cat', 'kat']. typing.Literal['cat', 'kat'] cannot be resolved.
This value can be a:
- Field
- Python primitive types that resolve to dagster config types
- int, float, bool, str, list.
- A dagster config type: Int, Float, Bool, Array, Optional, Selector, Shape, Permissive, Map
- A bare python dictionary, which is wrapped in Field(Shape(...)). Any values
in the dictionary get resolved by the same rules, recursively.
- A python list with a single entry that can resolve to a type, e.g. [int]
It seems like it's currently only supported in the context of discriminated unions (https://docs.dagster.io/guides/dagster/pythonic-config#union-types), is that correct? I just want to use it to limit the possible values for a field without having to write custom validators.