Skip to content

robot.utils.typehints

copy_signature

copy_signature(target: T) -> Callable[..., T]

A decorator that applies the signature of T to any function that it decorates see https://github.com/python/typing/issues/270#issuecomment-555966301 for source and discussion.

Source code in src/robot/utils/typehints.py
def copy_signature(target: T) -> Callable[..., T]:
    """A decorator that applies the signature of `T` to any function that it decorates
    see https://github.com/python/typing/issues/270#issuecomment-555966301 for source
    and discussion.
    """
    def decorator(func):
        return func

    return decorator