project_config.reporters.toml module

TOML reporters.

class project_config.reporters.toml.TomlColorReporter(*args: Any, colors: Optional[dict[str, str]] = None, **kwargs: Any)[source]

Bases: BaseColorReporter

Color reporter in TOML format.

_abc_impl = <_abc._abc_data object>
generate_data_report(data_key: str, data: dict[str, Any]) str[source]

Generate data report in TOML format with colors.

generate_errors_report() str[source]

Generate an errors report in TOML format with colors.

class project_config.reporters.toml.TomlReporter(rootdir: str, fmt: Optional[str] = None, only_hints: bool = False)[source]

Bases: BaseNoopFormattedReporter

Black/white reporter in TOML format.

_abc_impl = <_abc._abc_data object>
generate_data_report(data_key: str, data: dict[str, Any]) str[source]

Generate a data report in black/white TOML format.

generate_errors_report() str[source]

Generate an errors report in black/white TOML format.

project_config.reporters.toml._common_generate_errors_report(files_errors: FilesErrors, format_metachar: FormatterDefinitionType, format_file: FormatterDefinitionType, format_key: FormatterDefinitionType, format_error_message: FormatterDefinitionType, format_definition: FormatterDefinitionType, format_hint: FormatterDefinitionType, format_fixed: FormatterDefinitionType) str[source]
project_config.reporters.toml._normalize_indentation_to_2_spaces(string: str) str[source]

Normalizes indentation of the beginning of lines to 2 spaces.

project_config.reporters.toml._replace_nulls_by_repr_strings_in_dict(data: dict[str, Any]) dict[str, Any][source]

Iterates through a dictionary and replaces nulls by empty strings.