Пример #1
0
def _autogen_docstring(base):
    """Autogenerated wrappers will get their docstring from a base function
    with an addendum."""
    # msg = "\n\nAdditional kwargs: hold = [True|False] overrides default hold state"
    msg = ''
    addendum = docstring.Appender(msg, '\n\n')
    return lambda func: addendum(docstring.copy_dedent(base)(func))
Пример #2
0
def _autogen_docstring_inheritance(base, source_inheritance="Unknown"):
    """Autogenerated wrappers will get their docstring from a base function
    with an addendum."""
    msg = "\n\n[ This function is inheriting %s ]" % source_inheritance
    addendum = docstring.Appender(msg, '\n\n')
    return lambda func: addendum(docstring.copy_dedent(base)(func))