INNER CODE UNIT · Python
_format_score
LiuMengxuan04/shushu-internship-tool · skills/shushu-internship-tool/scripts/shushu_internship_tool/candidate_score.py:371
def _format_score(value: Any) -> str:
return f"{safe_float(value):.2f}"
def _should_include_taste_column(ranked: list[dict[str, Any]], include_taste: bool | None) -> bool:
if include_taste is not None:
return include_taste
return any(
safe_int(item.get("max_raw_score")) == TASTE_MAX_RAW_SCORE
or "taste_matches" in item
or "taste_mismatches" in item
for item in ranked
)
def _format_taste_fit(item: dict[str, Any]) -> str:
preference = item.get("score_breakdown", {}).get("user_preference", 0)
matches = normalize_list(item.get("taste_matches"))