karney._common

Attributes

HAVE_INDENT

dedent

Functions

indent(text[, amount, ch])

_get_h1line(object_)

Returns the H1 line of the documentation of an object.

_make_summary(odict)

Return summary of all functions and classes in odict

use_docstring_from(cls)

This decorator modifies the decorated function's docstring by

use_docstring(docstring)

This decorator modifies the decorated function's docstring with supplied docstring.

test_docstrings(filename)

write_readme(doc)

Module Contents

karney._common.HAVE_INDENT
karney._common.indent(text, amount=4, ch=' ')[source]
karney._common.dedent[source]
karney._common._get_h1line(object_)[source]

Returns the H1 line of the documentation of an object.

karney._common._make_summary(odict)[source]

Return summary of all functions and classes in odict

karney._common.use_docstring_from(cls)[source]

This decorator modifies the decorated function’s docstring by with the docstring from the class cls.

If the function’s docstring is None it is replaced with the supplied cls.__doc__. otherwise it is set to old_docstring.format(super=cls.__doc__)

This is useful when you want to reuse the docstring from another class or if you want modify the docstring of a function at runtime.

karney._common.use_docstring(docstring)[source]

This decorator modifies the decorated function’s docstring with supplied docstring.

If the function’s docstring is None it is replaced with the supplied docstring. otherwise it is set to old_docstring.format(super=docstring)

This is useful when you want modify the docstring of a function at runtime.

karney._common.test_docstrings(filename)[source]
karney._common.write_readme(doc)[source]