import functools


def func_args(func):
    """Return the arguments of `func`."""
    try:
        code = func.__code__
    except AttributeError:
        if isinstance(func, functools.partial):
            return func_args(func.func)
        else:
            code = func.__init__.__code__
    return code.co_varnames[: code.co_argcount]