jsonschema_diff.core.compare_base

Attributes

Classes

Module Contents

type COMPARE_PATH_TYPE = list[str | int][source]
type LEGEND_PROCESSOR_TYPE = dict[str, Any][source]
type LEGEND_RETURN_TYPE = dict[str, str | LEGEND_PROCESSOR_TYPE | list[str | LEGEND_PROCESSOR_TYPE]][source]
class Compare(
config: jsonschema_diff.core.config.Config,
schema_path: COMPARE_PATH_TYPE,
json_path: COMPARE_PATH_TYPE,
to_compare: list[ToCompare],
)[source]
status[source]
config[source]
schema_path[source]
json_path[source]
to_compare[source]
property my_config: dict[source]
compare() jsonschema_diff.core.abstraction.Statuses[source]
get_name() str[source]
is_for_rendering() bool[source]
calc_diff() dict[str, int][source]

Basic implementation: counts its own status as 1 element. Complex comparators (e.g. CompareList) override this to return an aggregate.

render(
tab_level: int = 0,
with_path: bool = True,
to_crop: tuple[int, int] = (0, 0),
) str[source]
static legend() LEGEND_RETURN_TYPE[source]