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: project_config.reporters.base.BaseColorReporter

Color reporter in TOML format.

_abc_impl = <_abc_data object>
data: Dict[str, Any]
errors: Dict[str, List[project_config.types.ErrorDict]]
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: project_config.reporters.base.BaseNoopFormattedReporter

Black/white reporter in TOML format.

_abc_impl = <_abc_data object>
data: Dict[str, Any]
errors: Dict[str, List[project_config.types.ErrorDict]]
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: Dict[str, List[project_config.types.ErrorDict]], format_metachar: Callable[[str], str], format_file: Callable[[str], str], format_key: Callable[[str], str], format_error_message: Callable[[str], str], format_definition: Callable[[str], str], format_hint: Callable[[str], str], format_fixed: Callable[[str], str]) 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.