Allow derived strategies

This commit is contained in:
hroff-1902 2020-02-03 06:20:01 +03:00
parent e8c1abc509
commit 537596001e

View File

@ -61,7 +61,8 @@ class IResolver:
valid_objects_gen = ( valid_objects_gen = (
obj for name, obj in inspect.getmembers(module, inspect.isclass) obj for name, obj in inspect.getmembers(module, inspect.isclass)
if (object_name is None or object_name == name) and cls.object_type in obj.__bases__ if ((object_name is None or object_name == name) and
issubclass(obj, cls.object_type) and obj is not cls.object_type)
) )
return valid_objects_gen return valid_objects_gen