util

util#

Various utilities.

Functions

add_spacer(lines)

Add empty line if line above not already empty.

did_you_mean(suggestions, wrong_key)

get_trait_typehint(trait[, mode, aliases])

Return the typehint corresponding to a trait object.

indent(lines[, num, initial_indent])

Indent lines.

stringify(obj[, rst])

Return a string representation of object.

tag_all_traits(**metadata)

Tag all class-own traits.

underline(lines[, char])

Underline content of the last line.

wrap_text(text)

Wrap text with multiple paragraph.

Classes

FixableTrait(trait[, default_value, ...])

Fixable parameter, specified in a filename pattern.

RangeTrait(*args, **kwargs)

Allow to specify a list of items using ranges.

Exceptions

ConfigError

General exception for config loading.

ConfigParsingError

Unable to parse a config value.

MultipleConfigKeyError(key, values[, msg])

A parameter was specified more than once.

UnknownConfigKeyError

Key path does not lead to any known trait.