Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion drf_braces/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ def find_function_args(func):
"""
try:
spec = inspect.getfullargspec(func) if hasattr(inspect, 'getfullargspec') else inspect.getargspec(func)
return [i for i in spec[0] if i not in IGNORE_ARGS]
arg_list = spec[0]
if hasattr(spec, 'kwonlyargs'):
arg_list += spec.kwonlyargs
return [i for i in arg_list if i not in IGNORE_ARGS]
except TypeError:
return []

Expand Down