flakeheaven.formatters._colored

class flakeheaven.formatters._colored.ColoredFormatter(options: argparse.Namespace)[source]

Bases: flake8.formatting.default.Default

Initialize with the options parsed from config and cli.

This also calls a hook, after_init(), so subclasses do not need to call super to call this method.

Parameters

options (argparse.Namespace) – User specified configuration parsed from both configuration files and the command-line interface.

_should_show_source(error: flake8.style_guide.Violation) bool[source]
after_init() None[source]

Check for a custom format string.

error_format: str = '{path}:{row}:{col}: {code} {text}'
format(error: flake8.style_guide.Violation)[source]

Format and write error out.

If an output filename is specified, write formatted errors to that file. Otherwise, print the formatted error to standard out.

show_source(error: flake8.style_guide.Violation) str[source]

Called when --show-source option is provided.