flakeheaven.formatters._gitlab

class flakeheaven.formatters._gitlab.GitlabFormatter(options: argparse.Namespace)[source]

Bases: flake8.formatting.base.BaseFormatter

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.

error_format = '{code} {text}'
format(error)[source]

Format an error reported by Flake8.

This method must be implemented by subclasses.

Parameters

error (flake8.style_guide.Violation) – This will be an instance of Violation.

Returns

The formatted error string.

Return type

str

handle(error)[source]

Handle an error reported by Flake8.

This defaults to calling format(), show_source(), and then write(). To extend how errors are handled, override this method.

Parameters

error (flake8.style_guide.Violation) – This will be an instance of Violation.

start()[source]

Prepare the formatter to receive input.

This defaults to initializing output_fd if filename

stop()[source]

Clean up after reporting is finished.