We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug When a Dict subclass is assigned to an omegaconf Node, the data from the dict is thrown away.
Dict
To Reproduce
$ cat tmp.py from dataclasses import dataclass from typing import Dict from omegaconf import OmegaConf @dataclass class Str2Str(Dict[str, str]): x: int = 0 a = Str2Str() assert a.x == 0 a["y"] = 1 assert a["y"] == 1 cfg_a = OmegaConf.create(a) assert cfg_a.x == 0 assert "y" in cfg_a assert cfg_a["y"] == 1
$ python tmp.py Traceback (most recent call last): File "/Users/lappy486/omegaconf/tmp.py", line 18, in <module> assert "y" in cfg_a AssertionError
Expected behavior We expect the above assertions to succeed.
Additional context
The text was updated successfully, but these errors were encountered:
Filed based on comments here: #581 (comment)
Sorry, something went wrong.
Yup, definitely smells like a bug.
Successfully merging a pull request may close this issue.
Describe the bug
When a
Dict
subclass is assigned to an omegaconf Node, the data from the dict is thrown away.To Reproduce
Expected behavior
We expect the above assertions to succeed.
Additional context
The text was updated successfully, but these errors were encountered: