lebrice / SimpleParsing

Simple, Elegant, Typed Argument Parsing with argparse
MIT License
399 stars 49 forks source link

Fix #126, deserialization with postponed type ants #127

Closed lebrice closed 2 years ago

lebrice commented 2 years ago

When from __future__ import annotations feature is used, the Serializable.from_dict method doesn't work correctly, since it can't find the right decoding function.

This fixes this bug, by checking if any known types match the given string, and then using those.

Also adds a test to reproduce issue #126

Signed-off-by: Fabrice Normandin fabrice.normandin@gmail.com