mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-04-29 11:54:49 +00:00
11 lines
237 B
Python
11 lines
237 B
Python
import inspect
|
|
|
|
|
|
def copy_function_args(func, locals_dict: dict):
|
|
signature = inspect.signature(func)
|
|
keys = signature.parameters.keys()
|
|
kwargs = {}
|
|
for k in keys:
|
|
kwargs[k] = locals_dict.get(k)
|
|
return kwargs
|