Yelp / kafka-utils

Apache License 2.0
313 stars 127 forks source link

Allow dynamic import to find the child-most class #256

Closed flavray closed 4 years ago

flavray commented 4 years ago

When using dynamic import to find a child class of base_class, if two classes match the criteria (e.g: class A, class B(A), class C(B)), dynamic_import would return B instead of C as it stops at the first class found in the package that is a subclass of A.

This commit changes the behaviour to return the child-most class.