Closed stevebyan closed 2 years ago
Does get_parsing_fn()
in simple_parsing/wrappers/field_parsing.py need a special case for enums?
Hey there @stevebyan , I'm really sorry for not getting back to you earlier.
This is a really nice bug. This wasn't being picked up by the tests, strangely enough. Added a test for it, was able to reproduce the issue, then added a fix. Now works correctly.
Thanks again!
Describe the bug While enums seem to be parsed by member name, a list of them seems to be parsed by member value, but only if the value is a string, not an integer
To Reproduce
Expected behavior A clear and concise description of what you expected to happen.
Actual behavior A clear and concise description of what is happening.
Desktop (please complete the following information):
Additional context If I add the proper encoders and decoders, I can load and save both kinds of enum lists from .json files just fine: