Merge pull request #2843 from hroff-1902/allow-derived-strategies

Allow derived strategies
This commit is contained in:
Matthias
2020-02-08 09:15:35 +01:00
committed by GitHub
3 changed files with 51 additions and 1 deletions

View File

@@ -61,7 +61,8 @@ class IResolver:
valid_objects_gen = (
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