Fix introspection logic when resolving class attributes.
Using getattr can cause classmethods to bind. In order to access the unbound class method, it must be accessed from the __dict__ attribute.
This commit is contained in:
@@ -711,8 +711,8 @@ def resolve_path(module, name):
|
||||
|
||||
if inspect.isclass(original):
|
||||
for cls in inspect.getmro(original):
|
||||
if attribute in vars(original):
|
||||
original = vars(original)[attribute]
|
||||
if attribute in vars(cls):
|
||||
original = vars(cls)[attribute]
|
||||
break
|
||||
else:
|
||||
original = getattr(original, attribute)
|
||||
|
||||
Reference in New Issue
Block a user