Open
Description
RIDE v2.0b1 running on Python 3.8.5.
Suppose I have a python library like the below. You can notice that I am using a decorator to print the function arguments. To preserve the original keyword function signature, I have used the functools.wraps
decorator for the decorator itself.
# Config.py
from functools import wraps
from robot.api.logger import info, debug
def log_func(func):
@wraps(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 Config:
@staticmethod
@log_func
def activate_config_file(filename: str):
# Do something with the argument
# other keywords
After the functools.wraps
decorator the LibDoc
is able to generate the help of activate_config_file
properly. However, RIDE still shows the decorator arguments in its help as follows.