(old: dict[str, Any], new: dict[str, Any])
| 335 | |
| 336 | |
| 337 | def _changed_metric_lines(old: dict[str, Any], new: dict[str, Any]) -> list[str]: |
| 338 | metric_keys = [ |
| 339 | "markdown.line_count", |
| 340 | "markdown.char_count", |
| 341 | "markdown.max_line_length", |
| 342 | "markdown.giant_lines_500", |
| 343 | "markdown.max_option_like_tokens_on_line", |
| 344 | "filtered.line_count", |
| 345 | "html.data_chars", |
| 346 | "html.tags.p", |
| 347 | "html.tags.br", |
| 348 | "html.tags.li", |
| 349 | "html.tags.blockquote", |
| 350 | "html.tags.pre", |
| 351 | "html.tags.a", |
| 352 | "html.tags.code", |
| 353 | "html.tags.em", |
| 354 | "html.tags.strong", |
| 355 | "html.tags.h1", |
| 356 | "html.tags.h2", |
| 357 | "html.tags.h3", |
| 358 | "html.tags.tr", |
| 359 | ] |
| 360 | changed: list[str] = [] |
| 361 | for key in metric_keys: |
| 362 | before = _get_metric(old, key) |
| 363 | after = _get_metric(new, key) |
| 364 | if before != after: |
| 365 | changed.append(f"- `{key}`: {_format_delta(before, after)}") |
| 366 | return changed |
| 367 | |
| 368 | |
| 369 | def _summarize_comparison( |
no test coverage detected