I am using a python library with a decorator for the purpose of logging all arguments passed to any keyword like below (using RobotFramework 4.0.1),
# MyLib.py
from robot.api.logger import info, debug
def log_func(func):
def inner1(*args, **kwargs):
info(f'Inside {func.__name__}')
debug(f'Arguments: {args}, {kwargs}')
r_val = func(*args, **kwargs)
info(f'Exiting {func.__name__}')
return r_val
return inner1
class MyLib:
@staticmethod
@log_func
def activate_config_file(arg1: str = 'val1', arg2: int = 0):
# Do something with the arguments
# other keywords
When I try to generate the documentation for activate_config_file keyword I get the following documentation,

It seems the decorator is coming in the way while deciding the arguments. How can we overcome this issue?