Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueNodes are not validating correctly. #324

Closed
pereman2 opened this issue Aug 5, 2020 · 0 comments · Fixed by #335
Closed

ValueNodes are not validating correctly. #324

pereman2 opened this issue Aug 5, 2020 · 0 comments · Fixed by #335
Labels
bug Something isn't working

Comments

@pereman2
Copy link
Contributor

pereman2 commented Aug 5, 2020

Nodes are being assigned wrong types. The following code shows that a list is assigned to a int, bool and str type which shouldn't happen.

@dataclass
class A:
    a: int = 5 
    b: bool = True
    c: str = "var"


cfg = OmegaConf.structured(A)
# Should raise error
cfg.a = [1, 2]
cfg.b = [1, 2]
cfg.c = [1, 2]
@omry omry added this to the OmegaConf 2.0.1 milestone Aug 17, 2020
@omry omry added the bug Something isn't working label Aug 28, 2020
@omry omry closed this as completed in #335 Aug 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants