Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:smarty12:Python
python-django-rest-framework-braces
pr_34.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pr_34.patch of Package python-django-rest-framework-braces
commit 904b1c4032ce7e3b695ffb122a219a8c07f06fe9 Author: John Vandenberg <jayvdb@gmail.com> Date: Sun May 15 09:28:54 2022 +0800 find_function_args: Include spec.kwonlyargs Fixes https://github.com/dealertrack/django-rest-framework-braces/issues/32 diff --git a/drf_braces/utils.py b/drf_braces/utils.py index 6730c17..e6323e5 100644 --- a/drf_braces/utils.py +++ b/drf_braces/utils.py @@ -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 []
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor