* general project refactoring * various small improvements * improve imap fixture with helper functions and typing * add wordpress send email setup * add wordpress receive email test * add various documentation Reviewed-on: local-it-infrastructure/e2e_tests#13 Co-authored-by: Daniel <d.brummerloh@gmail.com> Co-committed-by: Daniel <d.brummerloh@gmail.com>
19 lines
325 B
Python
19 lines
325 B
Python
import inspect
|
|
|
|
a = 2
|
|
b = 3
|
|
c = 4
|
|
|
|
|
|
def func(a: int, c: int) -> int:
|
|
return a + c
|
|
|
|
|
|
arg_names = inspect.getfullargspec(func).args
|
|
print(arg_names) # ['a', 'c']
|
|
|
|
arguments = {arg: globals()[arg] for arg in arg_names if arg in globals()}
|
|
print(arguments) # {'a': 2, 'c': 4}
|
|
|
|
result = func(**arguments)
|
|
print(result) # 6
|