0.2.0
Enhancements
#47 - Allow multiple subclasses of RegistersSubclasses to have the same register_as value. Classes and instances returned by registered_subclass
and registered_subclass_instance
are now always strict subclasses of the class invoking the method, and will only throw a KeyError if there are multiple valid subclasses with the same key. See the docstring for RegisteredSubclasses.registered_subclass
for more details.
Compatibility Changes
#47 - Please note that this update breaks backward compatibility on RegisteredSubclasses.registered_subclasses
which now returns Dict[str, List[Type[RegistersSubclasses]]]
instead of Dict[str, Type[RegistersSubclasses]]
. If you have existing code that uses this method, please replace calls to RegisteredSubclasses.registered_subclasses()
with RegisteredSubclasses.registered_subclasses()[0]
.