Skip to content

Commit 0415bea

Browse files
Add support for static methods in get_functions (#1770)
1 parent 7082d5e commit 0415bea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webview/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def get_functions(obj: object, base_name: str = '', functions: dict[str, object]
196196
continue
197197

198198
attr = getattr(obj, name)
199-
if inspect.ismethod(attr):
199+
if inspect.ismethod(attr) or inspect.isfunction(attr):
200200
functions[full_name] = get_args(attr)[1:]
201201
# If the attribute is a class or a non-callable object, make a recursive call
202202
elif inspect.isclass(attr) or (

0 commit comments

Comments
 (0)