Skip to content

Commit c079356

Browse files
committed
Also directly access staticmethods
1 parent 265dd4f commit c079356

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bpython/inspection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def getattr_safe(obj: Any, name: str) -> Any:
359359
if isinstance(result, MemberDescriptorType):
360360
result = getattr(obj, name)
361361
# classmethods are safe to access (see #966)
362-
if isinstance(result, classmethod):
362+
if isinstance(result, (classmethod, staticmethod)):
363363
result = result.__get__(obj, obj)
364364
return result
365365

0 commit comments

Comments
 (0)