File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -843,8 +843,8 @@ def is_strict_base(typ):
843843 mro .append (subcls )
844844 return _c3_mro (cls , abcs = mro )
845845
846- def _find_impl (cls , registry ):
847- """Returns the best matching implementation from *registry* for type *cls *.
846+ def _find_impl (cls_obj , registry ):
847+ """Returns the best matching implementation from *registry* for type *cls_obj *.
848848
849849 Where there is no registered implementation for a specific type, its method
850850 resolution order is used to find a more generic implementation.
@@ -853,6 +853,7 @@ def _find_impl(cls, registry):
853853 *object* type, this function may return None.
854854
855855 """
856+ cls = cls_obj if isinstance (cls_obj , type ) else cls_obj .__class__
856857 mro = _compose_mro (cls , registry .keys ())
857858 match = None
858859 for t in mro :
You can’t perform that action at this time.
0 commit comments