You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The validation of unions, which are nested in a dict seems to be broken and throws a ValidationError during a merge, even if the types should be correct.
To Reproduce
The last line is throwing the ValidationError:
ValidationError: Value 1 (int) is incompatible with type hint 'typing.Union[int, str]'
full_key: z.c
reference_type=Dict[str, Dict[str, Union[int, str]]]
object_type=dict
Expected behavior
I expect z.c.b = 1 not to fail, since 1 is a valid type of Union[str, int] and if the Union is not nested inside a dict.
Additional context
OmegaConf version: 2.3.0
Python version: 3.11.6
Operating system: Kubuntu 23.10
The example above is enough to replicate the error
The text was updated successfully, but these errors were encountered:
Describe the bug
The validation of unions, which are nested in a dict seems to be broken and throws a ValidationError during a merge, even if the types should be correct.
To Reproduce
The last line is throwing the ValidationError:
This is the exception thwown at the last line:
Expected behavior
I expect
z.c.b = 1
not to fail, since1
is a valid type ofUnion[str, int]
and if the Union is not nested inside a dict.Additional context
The text was updated successfully, but these errors were encountered: